Have you moved domains, or did you add another domain to the army of domains pointing towards your website? You might be wondering how to handle this regarding SEO and 301 redirects. You’ll want the domains to point to one, canonical domain which Google sees as the master domain.
In a less-than-perfect world, this would be the point where I write a detailed tutorial. But the truth is that WordPress comes with a built-in method to setup 301 redirects from all secondary domains to the main domains.
WordPress will automatically create a 301 redirect from any domains pointing towards your WordPress installation, to the domain you’ve got configured in WordPress itself as the “WordPress URL”. You can change this value under Settings > General under “WordPress URL”.
Is there more to it?
Nope, that’s all you’ve got to do. Of course, keep in mind that this advice applies to an existing, functioning site with the domains working properly.
If you’re planning to not only change the domain name but also move the installation between servers, E.G from a testing environment to the live environment, things might get a bit more complicated. Unless you are using Akeeba Backup for WordPress in combination with Kickstart. Upon “recovering” your back-up it will ask for the new site URL and make changes in all those hard to reach places of WordPress, which used to make changing your URL a b****. It works for 99% of the pages, images and other links.
So, here’s a summary of what to do.
- Changing domain on existing site: Use Settings > General > WordPress URL
- Also changing hosting: Use the excellent Akeeba Backup for WordPress tool