Knowledge Base

How to redirect the primary domain to an existing WordPress installation

This article describes how to redirect the primary domain to an existing WordPress installation.

For example, you might install WordPress into a subdirectory on your account for testing and development. Later on, however, you want to continue using this installation as the WordPress site for your primary domain. In other words, instead of going to http://www.example.com/wordpress-test to view the WordPress site, you want to be able to just go to http://www.example.com and see the WordPress site.

To do this, you can configure redirection in the .htaccess file in the public_html folder.

Configuring redirection

To configure redirection to the existing WordPress installation, copy and then paste the following directives into the .htaccess file located in the public_html directory. Make sure you replace occurrences of example.com with your own domain name, and occurrences of directory with the name of the directory where you previously installed WordPress:

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.