This section provides information on how to redirect all traffic to a primary domain, which is a best practice for SEO. This means if you choose
www.example.com as your primary domain, then if a visitor navigates to a bare domain, for example,
example.com (or any other domain you have connected to your site), they will end up on
Choose one of the following options to configure the primary domain.
With a Primary Domain set at the platform level, all other domains (except the platform domain) will be pointed to your Primary domain at the root level. If you want to redirect secondary domains to specific pages on your site (for example,
newdomain.com/old-landing-page), do not set a Primary Domain. Instead use PHP redirects.
Navigate to the environment you want to set a primary domain for (typically Test or Live), and then select Domains / HTTPS.
Ensure that all domains have been added and are listed.
Navigate to the Choose Primary Domain section, select the domain to which traffic should be redirected, and then click Save Configuration.
You will only see the primary redirect option when you have two or more custom domains attached to your environment. If you want to redirect a single platform domain, you must do the primary redirect via PHP. For example,
Install or upgrade to the latest version of Terminus.
Use Terminus to add the primary domain. In this example, replace:
my-sitewith your site name
liveif you'd like to set it for a different environment
www.example.comwith your primary domain
terminus domain:primary:add my-site.live www.example.com
WordPress site admins must ensure that all URLs in the site's database are updated. See Fix WordPress Content References to the Wrong Domain After Cloning for more information.
You should configure a long-duration HTTP Strict Transport Security (HSTS) header, or set up an availability monitoring service to watch over your site after redirecting requests to a single, primary domain.
HSTS instructs browsers to only connect via HTTPS and helps protect websites against protocol downgrade attacks and cookie hijacking. Refer to Enforce HTTPS + HSTS for more information.