Your first task is to physically change your site’s URL within WordPress. However, this step comes with a word of warning. Once you save your changes, your site’s back end won’t be accessible until you’ve completed the rest of this procedure.
To begin, log into WordPress, and navigate to the General > Settings screen:
This screen contains global settings for your WordPress site. The fields we’re interested in are WordPress Address (URL) and Site Address (URL):
To change your URL, simply type the new address into both of these fields, and click on Save Changes. As we mentioned, this will make your site temporarily inaccessible.
This final step is more of a ‘clean-up’ job. Even once your domain is successfully changed, you’ll have a lot of links throughout your content and across the web that point back to your previous address. Fortunately, you can permanently redirect those links to your new domain.
To do this, you’ll need to once again access your site via FTP, and look for the .htaccess file. This is another WordPress configuration file (so it’s worth copying to your desktop as a backup before you tweak it). Within, you’ll want to add the following code:
RewriteRule ^(.*)$ http://www.example.COM/$1 [R=301,L]
Again, the placeholder URL should be changed reflect your new domain.
Once you’re done with that, the final task is to tell Google that you’ve updated your domain. The process is straightforward within Google Search Console, and will only take a few minutes.
Last updated Apr 21, 2022
Applies to: Other