A complete guide to WordPress 301 redirects
Your WordPress site is made up of many URLs.
Most of these URLs have links to other sites on your page to improve the site’s user experience and help you sell a product, get a lead, generate ad revenue or generally inform and educate your readers.
But what happens when you want to remove some of these URLs or change the way they look? What happens when you end up with broken links on your site?
That’s the moment when 301 redirects save the day.
- 1 301 redirects in WordPress
- 2 What exactly is a 301 redirect?
- 3 When are 301 redirects used?
- 4 Creating a 301 redirect on a WordPress Website
- 5 Best WordPress 301 redirection plugins
- 6 Do 301 redirects hurt SEO?
- 7 301 redirects using the htaccess file
- 8 How long should I keep a 301 redirect active?
- 9 Conclusion
301 redirects in WordPress
Adding a 301 redirect in WordPress is simple and ensures that you’re only serving your readers the best content. In fact, 301 redirects in WordPress can help you redirect an entire domain from an old site to a new site.
This comprehensive guide will show you everything you need to know about creating a 301 redirect in WordPress, the best redirection WordPress plugin or editing your htaccess file, and redirecting your existing WordPress content to a new location.
What exactly is a 301 redirect?
A 301 redirect is a permanent redirection of one URL to another. It’s a super simple way of telling a browser that the page the user is navigating to isn’t there anymore, but also providing that browser with the correct page.
WordPress redirects like this are often used to fix broken links and take users to the correct page.
301s are just one type of redirect HTTP status code or redirect code, of which there are several. They can be made using a simple WordPress plugin or by editing your server’s htaccess file directly in your WordPress installation.
301 is a permanent redirect of a URL that’s been permanently moved. There are other types of permanent redirect codes (308, 303, and so on), but a 301 redirect is by far the most simple. They ensure that users are served the most up-to-date content and not a different old page and that search engine bots can crawl your optimized content.
When are 301 redirects used?
We’ve alluded to a few situations in which you’d use 301 redirects in WordPress, but let’s take a closer look at the most common situations.
Improve user experience
The last thing you want is for someone to go from Google or a different page on your site and land on a page that’s ‘404 not found‘. 404’s happen for a variety of reasons, and 301 redirects WordPress users to your preferred target URL and eliminates the chances of them landing on that 404 page.
A change in the URL structure
The structure of your URL is an important part of ranking your site in Google but also an essential part of your user experience. You want your site to have a consistent structure of your URLs over your WordPress blog, e-commerce site, and all other aspects of your domain. Therefore, once you’ve created this consistent structure, you’ll need to redirect users to the correct URL, even though it may have the same content.
If you’ve built loads of links to a URL that you now want to delete, 301 redirects in WordPress help you pass on link equity from that old URL to a new target URL. Link equity, or ‘SEO juice‘ passes from your old URL, through the redirect, to your new target URL. This means that your new redirected URL can leverage some of the link equity from the old URL. But a word of warning – don’t try to exploit the fact that link equity is passed on – more on that later.
One of the best ranking factors is the age of a URL. The longer a URL has been around, the more it’s been crawled by Google, and the more Google trusts that URL and will therefore rank it higher. If you want to delete this URL for whatever reason, it may take some time for Google not to place that URL in search results. 301 redirects help search engines understand that content has been permanently moved to a new page.
Removing old content on your WordPress site
Good content management often involves killing underperforming content. Not all our ideas work, and having blog articles, product pages, or old pages that don’t do anything can actually be harmful to your SEO efforts.
But when you delete or unpublish a page in WordPress, the URL is still in the sitemap, and Google still crawls it. Therefore, you need to use a 301 redirect in WordPress to tell Google that the URL has permanently moved.
Moving to a new domain
A rebrand or a renaming of your company can help you grow, adapt and come of age. Sometimes, this involves a change of name, and ultimately a new domain. For your digital marketing team, this means having to 301 redirect the entire domain from the old domain to the new one.
Luckily, 301 redirects can be done in such a way that all the old URLs from your old domain automatically point to the new equivalent.
Going from HTTP: to HTTPS:
Having HTTPS, or adding SSL security to your domain is a huge search engine ranking factor for Google. By implementing an SSL certificate on your web server, you’ll need to put 301 redirects on all your existing URLs. A simple 301 redirect plugin can help with this.
Creating a 301 redirect on a WordPress Website
Whether you want to edit your htaccess files or use a simple WP plugin, adding a 301 redirect is not complicated.
Best WordPress 301 redirection plugins
There are many WordPress plugins, and it should be no surprise that a lot of those are 301 redirect plugins. Whether it’s a simple redirection plugin or a complex automation system, here are some of the most popular, powerful, and versatile plugins for your 301 redirects.
AIOSEO (All In One SEO) is a powerful and free SEO redirection plugin. However, if you’d like to use the 301 redirection feature, you’ll need to upgrade to the premium version (which has many other features, too!)
301 redirects WordPress users and AIOSEO makes it simple to do just that for your WordPress site. Simply enter the source URL and then the destination URL and enable the redirection. You can add URLs in bulk, say, from a CSV file, and also keep track of how many hits that 301 redirect has had.
Other 301 features of the AIOSEO WordPress Plugin include being able to see all your redirections at a glance in your WordPress dashboard, search for a specific URL and track 404 errors.
Redirection is probably the most widely used redirection WordPress plugin. Whether you need two or three, or thousands, redirection can create that 301 redirect in WordPress for you.
Its most attractive feature is how easy it is to use. Type the old URL, type the new URL, and apply the redirection. Other features include the ability to import and export a CSV file of your 301 redirects, track 404 errors and create a conditional 301 redirect.
Yoast SEO is the go-to SEO plugin for many webmasters. Using the premium version, it becomes a versatile redirection plugin.
Within your WordPress dashboard, you can use Yoast SEO to automate the creation of 301 redirects for pages that are deleted. As well as 301 redirects, you can create 302, 307, 410, and 451 redirects. Yoast Premium even integrates with Google Search Console. You can also add specific 301 redirect rules in Yoast SEO, including a temporary 301 redirect if you need it.
At $89 a year, this SEO plugin is a worthy investment.
301 Redirects – Easy Redirect Manager
301 redirects WordPress users, and for many webmasters, it doesn’t need to be a complicated process. If you’re in need of simple 301 redirects in WordPress, then Easy Redirect Manager is a plugin you might be interested in. Taking care of just 301 and 302 redirects, this plugin can help you keep track of all your redirection statistics, manage bulk imports and exports of your 301 redirect, and also manage redirects across all types of WordPress content – pages, posts, product pages, archives and so on.
It’s free, versatile, and easy to use. What more can you ask for in a redirection plugin?
SEO Redirection Plugin – 301 Redirect Manager
Most of the time, content management is done with a scalpel. Small but effective changes are made. But from time to time, it has to be done with a sledgehammer. Removing entire categories, hundreds of URLs, or perhaps even redirecting an old website to a new WordPress site.
That’s where the SEO Redirection Plugin – 301 Redirect Manager plugin helps.
You can obviously add 301, 302, and 307 redirects manually. But you can also support wildcard redirection, fix 404 crawl errors from Google Search Console, import and export 301 redirects, and easily see all redirection data. Add a temporary redirect, add custom redirection codes and create redirects as soon as content is deleted and automatically send users to the requested page.
This is a powerful WordPress redirection plugin for those having to make a huge change, like a permanent redirect of one site to another.
Do 301 redirects hurt SEO?
You’ve no doubt seen this situation before.
Your old URL is – well, old – and being indexed by search engines. You’re getting organic traffic, you’ve got good backlinks to that URL, but for whatever reason, you want to use a redirection plugin to point that URL to a new page.
And you’re worried about losing that organic traffic.
First, let’s make it clear that using 301 redirects is a good thing. Google won’t punish you for using them. It simply helps point Google to a fresher, newer, and more relevant page than what’s on the old URL. Search engines record this change and pass some (not all) of the ‘SEO juice’ from the old page to the new page.
That being said, it will take time for Google to crawl and index your new URL, extract keywords and rank your site accordingly. And your old URL may very well still appear in the search results until that happens.
301 redirects and your SEO strategy
But taking a broader look, you might be asking if too many 301 redirects can hurt your site.
And like most things in SEO, it depends.
If you’re using 301 redirects to ‘trick’ Google, then yes, Google may very well hand you a manual action. If you have thousands of old URLs that you want to delete, then putting 301 redirects from the old URL to a new page will not hurt your SEO efforts. That is, after all, what 301 redirects are to be used for.
301 redirects using the htaccess file
You can also make a 301 redirect on your WordPress website by directly editing the htaccess file. This is a web server configuration file and is arguably the most important file on your site. Edit the htaccess file with caution, knowing that the htaccess method can cause havoc on your entire website.
301 redirects using the htaccess file are used when you want to redirect the entire domain while keeping the same URLs – for example, mysite.com/blog to mynewsite.com/blog.
To edit your htaccess file, you’ll need FTP access to your server. The htaccess file is located in the root folder of your WordPress directory. If you can’t see your htaccess file, then you’ll need to turn on ‘show hidden files in your FTP client’. Remember that your htaccess file is one of your hidden files for a reason.
Make a copy of your htaccess file before editing it in case something goes wrong.
Again, making a 301 redirect in WordPress using your htaccess file is quite advanced and is only recommended for those familiar with writing in Apache.
How long should I keep a 301 redirect active?
This is one of the most common questions our WordPress experts get asked. How long should a 301 redirect be active on existing pages that we may want to use again in the future?
Again, there’s no one clear-cut answer. How long you keep a 301 redirect in WordPress depends on several factors, like your site’s user experience without that old page. Also significant is the direct traffic coming to your site from external links and how frequently Google is crawling your site.
Our experts say that keeping 301 redirects active for at least a year is a good rule of thumb. That being said, there’s nothing wrong with keeping a 301 redirect active indefinitely if there’s no different page to send the user to.
301 redirects in WordPress don’t have to be complex. There’s no coding to write, and there’s not even a code snippet to install. Whether you want to battle with your htaccess code or use a plugin to change all the URLs on your site, redirecting an original URL to new target URLs is simple, quick, and vital.
In regularly checking your site’s health, you’ll need to create redirects regularly or point old sites to a new location in order to improve your user’s experience. It should also be part of your strategy to temporarily redirect an old URL to a new URL to see how link juice is passed on and improve your rankings.
If you’re battling with redirects on a new domain or an old site, our WordPress experts are on call to help you iron out any issues you may have. We can also help you create a long-term marketing strategy that’ll eliminate the chances of 404 pages, meaning you can spend less time policing your site trying to find issues and more time on what’s important.