Set a default domain that redirects all traffic to a specific domain.
The default domain is the domain to which you want to redirect other domains. These other domains can be your old domains (e.g., to redirect www.oldsite.com to www.newsite.com) or variations of your new domain — a simple example is redirecting your root domain (e.g., newsite.com) to your full domain (e.g., www.newsite.com).
Before you get started
Connect your custom domain and set your DNS records with your domain registrar or DNS provider. Learn more about connecting a custom domain.
Terminology
There are a few terms you should know for this lesson:
-
Root domain — the domain you purchase from a registrar (e.g., domain.com, domain.net, etc.)
-
Subdomain — the part in front of the root domain like the “www” in www.domain.com or the word “blog” in blog.domain.net
-
Default domain — the domain where you’d like to redirect your site traffic. For example, if you set the www subdomain (e.g., www.domain.com) as your default, site visitors who enter domain.com in the address bar of their browser will be redirected to www.domain.com.
How to set a default domain
First, make sure you’ve connected all of your custom domains in Site settings > Publishing tab > Production. Learn more about connecting a custom domain.
If you’ve connected more than one domain to your site, you’ll need to set a default domain to redirect all traffic from the other domains to the default. This helps avoid SEO penalties due to duplicate content.
To set the default domain:
- Open Site settings > Publishing tab > Production
- Click Make default next to the domain you’d like to set as the default
NoteIf you add a new domain or subdomain to your site after you’ve already set a default domain, the new domain or subdomain won’t appear within the publish menu. To resolve this, go to Site settings > Publishing tab > Production and click Make default next to the current default domain. Then, publish your site to the new domain or subdomain and set the default domain again.
How to fix the ERR_TOO_MANY_REDIRECTS error
The default domain on SSL must be served on a domain that has a CNAME record. Many domain registrars and DNS providers don’t offer CNAME flattening, so you’ll likely need to set the www subdomain (e.g., www.yourdomain.com) as the default domain.
Redirecting site traffic to the root domain (e.g., yourdomain.com) requires a slightly different setup for your DNS records. Learn more about setting the root domain as the default domain on SSL hosting.
If you’ve set the incorrect domain as the default, site visitors will hit the ERR_TOO_MANY_REDIRECTS error when visiting your site. To fix this issue, set the www subdomain (e.g., www.yourdomain.com) as the default domain and republish your site. Learn more about the too many redirects error.
How to redirect your old domain to a new domain
Setting a default domain is also a great way to redirect any old domain names to new ones. To do this, connect all your domains, old and new, and then set one of the new domains as the default and publish to the default domain.