In this lesson, we'll 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
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.
From the environment you want to set a primary domain for (typically Test or Live), navigate to Domains / HTTPS.
Ensure that all domains have been added and are listed.
In the Choose Primary Domain section, select the domain to which traffic should be redirected, and click Save Configuration.
Install or upgrade to the latest version of Terminus.
Use Terminus to add the primary domain. In this example, replace
my-site with your site name, and
live if you'd like to set it for a different environment, and
www.example.com with your primary domain:
terminus domain:primary:add my-site.live www.example.com
Now that you're redirecting requests to a single, primary domain, it's the perfect time to configure a long-duration HSTS header, or set up an availability monitoring service to watch over your site like an automated hawk.
Prevent cookie hijacking and get an A+ rating from SSL Labs.
New Relic provides a free availability monitoring service that sends a request to designated URLs from configured locations at given intervals and alerts you via email if a response fails.