Redirect apex to www

Bring every visitor to one address, with or without www

An apex domain is your domain without any subdomain in front of it, such as example.com. It's also called the root or naked domain. Its www version, www.example.com, is a subdomain like any other.

People type both. So pick one as the address your site lives on, and send the other there with a 301. Search engines and visitors then see one version, whichever one gets typed.

Redirect apex to www, shown as a dotted arc moving from a faint square icon to a bold target icon, with redirect.pizza logo


Apex or www: which one should you pick?

For SEO, the choice itself doesn't matter. Google treats example.com and www.example.com as separate URLs, so what counts is that you pick one and redirect the other. MDN's advice is the same: choose one and stick with it.

The real difference sits in DNS. A CNAME record can't share its name with other records, and the apex always carries SOA and NS records. So the apex can't take a CNAME.

That matters because many hosting platforms and CDNs ask you to connect your site with a CNAME. Their IP addresses can change, and a CNAME follows them. On www, that works. On the apex, you need another route.

Three ways to point the apex

  • ALIAS or ANAME record. Some DNS providers offer a CNAME-like record that is allowed on the apex. Not every provider has one, and the name differs per provider.
  • A and AAAA records. Point the apex at the IPv4 and IPv6 addresses your host gives you. If those addresses change, you update the records yourself.
  • Site on www, apex redirected. The apex gets A and AAAA records that point at a redirect service, and www keeps the CNAME your platform asks for.

redirect.pizza handles the third route. If your DNS provider offers ALIAS or ANAME, you can also point the apex at edge.redirect.pizza with it.

Do you need a Change of Address in Search Console?

No. Google says you don't need the Change of Address tool when you switch between www and non-www on the same domain. The 301 does the work.


How to redirect the apex to www with redirect.pizza

  1. 1

    Add the apex as the source, for example example.com.

  2. 2

    Set the destination to the www version, https://www.example.com.

  3. 3

    Turn on path forwarding, so example.com/contact lands on www.example.com/contact instead of the homepage.

  4. 4

    Create the redirect. It's a 301 by default.

  5. 5

    At your DNS provider, set the apex A record to the value redirect.pizza shows under Hostnames. Add the AAAA record for IPv6.

  6. 6

    Wait for the DNS change. It can take up to 24 hours, although most changes are picked up within an hour. Once it's verified, redirect.pizza issues the certificate, so both http:// and https:// work.

The Create redirect screen in redirect.pizza, with example.com as the source, https://www.example.com as the destination, a Permanent (301) type and path forwarding on

Going the other way, from www to the apex? Use www.example.com as the source and https://example.com as the destination. The DNS change is then a CNAME for www. The support article on redirecting non-www to www has both directions.

The Free plan (Margherita) covers this setup. The apex counts as one source hostname, and Free includes five.


What comes with the redirect

redirect.pizza issues the certificate for the apex and renews it before it expires, with an A+ rating at SSL Labs on every plan. More on automatic HTTPS.

Path and query forwarding, also on every plan, keep deep links and campaign parameters intact. And there's no server of your own to keep running for the redirect.

Analytics, from Basic (Pepperoni), shows how much traffic still arrives on the apex, with the top countries and referrers and crawler versus human traffic. See analytics.

Get started for free: Redirect your apex domain to www


Frequently Asked Questions

Either works for SEO, as long as you pick one and redirect the other to it with a 301. Choose www if your host or CDN wants a CNAME and your DNS provider has no ALIAS or ANAME record. Choose the apex if you prefer the shorter address and your setup supports it.

A CNAME-like record that some DNS providers allow on the apex. It points the apex at a hostname and answers with that hostname's IP addresses. Not every provider offers one, and the name differs per provider.

Domain redirects delivered hassle-free

Get started right away

  • Free plan
  • No creditcard required
Serving millions of redirects for
Warner Bros.
Harvard
CalTech
Jaguar
Palo Alto Networks
Cloudera
Raymond James
ElevenLabs
Visit California
FACEIT
Red Bull
Boels Rental
Bam
Nando's
Culture Gouv FR
Visma
team.blue
SD Worx
Unit4
Kneipp
Zurich Airport
SRF
Kaefer
DC Thomson
Hirslanden
C.H. Beck
IU
Framery
Mehiläinen
Intersport
JAKO
Steiff
Switzerland Tourism
Concept2
Teamleader
Ascension
Chargify
JBS SA
NESN
Wunderman Thompson
Lerner Publishing Group
RGF Staffing
Apollo
MCC
Dansk Erhverv