Redirecting Additional Domains

Additional domains can be added to any site that is hosted with us. You can learn more about additional domains on our domains page.

After the domain has been registered, transferred or pointed over to us it will redirect to the home page of the site it was ordered for as an additional domain. If need be, you can change the primary domain of the site with the help of our Defining the Primary Domain for My Site tutorial.

In some cases additional domains need to be redirected to a specific page on the website, for example a landing or product page. This can be done either with a simple PHP file in the mu-plugins folder, or on the server level with a NGINX redirect. 

Please note that we cannot take responsibility for customer created redirects or other NGINX configurations. In case the configurations cause errors or issues and our customer support is asked to fix it, we might have to charge the work as expert services. We're more than happy to handle these configurations for you as part of our expert services, contact us to learn more!

To create a NGINX redirect, connect to the site via SSH and navigate to the NGINX folder: cd data/wordpress/nginx/

Next step is to create a new configuration file, we'll call this redirect.conf for the sake of clarity: touch redirect.conf

Then we'll use a text editor, in our case nano, to modify the contents of the file: nano redirect.conf

Inside, we'll add the following:

# Redirect from an additional domain to a specific page on the website
if ($host ~ myproduct.com) { return 301 https://mydomain.com/myproduct/;}

Then, if using nano as the editor like we did, press ctrl + S and ctrl + X to save and exit the file. Now you're ready to restart NGINX for the effect to take place: wp-restart-nginx

The final step is to test the redirect works. This is best done with cURL, as browsers have multiple layers of cache enabled, which might cause the page to load from memory, instead of NGINX, which is running on our servers.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.