Redirecting the non-www version of a domain to the www version, or the other way around, is one of the most common redirect.pizza setups. The non-www hostname is also called the naked, root or apex domain. Read more about why you'd want this redirect.
Setting it up
- Create a redirect.pizza account.
- Add the hostname without www as the source, for example example.com.
- Set the destination to the www variant: https://www.example.com.
- Enable path forwarding, so example.com/contact ends up on www.example.com/contact rather than on the homepage.
- Press Create redirect. This creates a 301 (permanent) redirect by default, which tells search engines to transfer the ranking signals to the www version.
- Make the required DNS change at your registrar or DNS provider: an A record for the apex, which may already exist as @. Edit it to the value redirect.pizza shows. See What are these DNS changes?
The DNS change can take up to 24 hours to propagate. Once verified, redirect.pizza provisions an SSL certificate so the redirect works over both HTTP and HTTPS.
Redirecting www to non-www
The same steps apply in reverse: use www.example.com as the source and https://example.com as the destination. The DNS change is then a CNAME record for www instead of an A record.
Want to know more about why this redirect matters for SEO and how DNS-level redirects compare to server-side ones? Read our guide on redirecting non-www to www. Redirect not working? See Troubleshooting new redirects.