← ServerPilot Docs

Solution to WordPress Showing the Wrong Domain

If you have a WordPress site with multiple domains (or multiple versions of the same domain, such as with or without www., you might notice your browser redirecting to the to wrong URL.

If you installed WordPress using http://WWW.yourdomain.com or http://YOURIPADDRESS rather than http://yourdomain.com, WordPress may have incorrect settings for what it believes to be your site's true URL.

As a result, it keeps redirecting you to the the original domain.

You can correct this through WordPress's General Settings, as shown below.

If you prefer or if the above doesn't work, you can also change these settings by adding the following lines to your app's wp-config.php file (change example.com to your domain):

define('WP_SITEURL', 'http://example.com');
define('WP_HOME', 'http://example.com');

Launch your first site in 5 minutes