Once you added a new domain name for your application you might wonder why WordPress is redirecting you to the old site name. This is due to the site name being set to the default generated domain. In order to fix this please follow these simple steps:
- Login to the admin interface and then navigate to General > Settings
- Enter the new site name in the WordPress address/Site address text boxes (we recommend using https:// whenever possible)
- Click on Save changes
If you already created content on the site and you realize that some of the URLs are still pointing to the old domain name, we recommend that you install a plugin that can search your database and replace the incorrect links (Better Search Replace is a plugin used by some of our customers with success).