If you’re ever planning to change your WordPress permalink structure, change the slug on a single post, or migrate your entire WordPress site to a new domain, then 301 redirects are going to be your best friend.
301 redirects allow you to seamlessly redirect traffic from one URL to another without negatively affecting user experience for humans or SEO for robots.
In this post, I’ll show you how you can add 301 redirects to WordPress using a free plugin, as well as via your site’s .htaccess file. For the latter, I’ll also cover the redirect code snippets for all the scenarios that I mentioned in the first sentence.
WordPress 301 Redirects Explained In More Detail
301 redirects are a specific type of redirect that tell web browsers and search engines:
“The content that was originally at this location has permanently moved to this new location that I’m sending you to”
As part of that, the person (or search engine) will be automatically “redirected” to the new page.
So, say you have a 301 redirect like this:
Anyone who visits this URL:
Will be automatically taken straight to this URL (this usually happens so quickly that people don’t even notice):
This is important because it ensures:
Search engines know to replace the old page with the new page in the search engine rankings
You don’t lose traffic from existing traffic/links to your content
You can also use wildcards to create more complex redirects that affect multiple pages at once.