As an SEO or website owner, sooner or later you are bound to run into redirects. Whenever you delete a page, change your URL structure or switch to a new domain, you’ll have to redirect your URLs. Changing URLs is really important for your SEO, but can be quite daunting. That’s why Yoast SEO Premium offers the redirect manager. That’ll make redirecting URLs a lot easier!
A redirect tells search engine robots to go somewhere else, either temporarily or permanently, to access a particular page. Choosing the wrong type of redirect might adversely impact your SEO, so be careful which you pick. This post explains the different types of redirects and when you should use them.
Why use redirects?
Redirecting URLs should be part of your regular website maintenance. There are many reasons for using a redirect, but these are the most common:
- Deleting a page or post
- Moving your site to a new domain
- Dropping the use of www in your domain
- Enabling permalinks in WordPress
- Merging websites
- Changing your CMS
- Changing your URL structure
HTTP status codes
To understand how redirects work and how you can influence what a server returns to a browser, you need to know about HTTP status codes. An HTTP status code is a set number that a server sends to a browser following a particular request for a page. These codes may include 200, 301, 404 and 503, for example, and each code serves a particular purpose. A 404, for instance, indicates that a page has not been found. A 503 means that the server is temporarily offline for maintenance or due to overload.
If you want to maintain your site faultlessly, you need to know your HTTP status codes, and you can read up on them in more detail here: HTTP status codes and what they mean for SEO.
Types of redirects
There are a couple of redirects that you’ll run into on a daily basis, so it’s a good idea to remember them:
- 301 Permanent redirect
- 302 Found
- 307 Temporary redirect
These aren’t really redirects, but still useful:
- 410 Content deleted
- 451 Content unavailable for legal reasons
301 Permanent redirect
The 301 is one of the most common redirects, and you should use this if you permanently want to redirect a deleted or moved page, or if you’ve changed something in your permalink structure. This redirect code tells search engine robots that the page in question is no longer available at this location and that it should not be indexed anymore. If you don’t set a redirect correctly, the chances are your visitors – and crawl bots – will see 404 error messages – and that’s not something you want to happen.
Since a 301 permanently leads visitors from the old URL to a new one, you should only use it if you’re sure you’ll never use the old URL again. If you do want to use the URL again, you need a temporary redirect instead. A 301 passes all the link value a discarded URL has accumulated over the years over to the new URL, so it causes the new URL to gain or retain value. To learn how to implement your 301 redirects with WordPress, read this post by Jimmy or just use the redirect manager in Yoast SEO Premium.
A 302 is a fairly ambiguous redirect and is often used as a temporary redirect. The code means that the requested content has been found, but it lives in a different location. It doesn’t say why. If you want to send visitors to an alternative page when visiting this particular page, and you want to reuse the URL in the future, use a 302.
Since this is a temporary redirect, it doesn’t pass link value. Hence, it’s possible to reclaim the URL with its value intact. Just don’t use it when moving a site to a new domain or when you’re doing other large-scale re-organization on your site.
307 Temporary redirect
302s are often used to create temporary redirects, but, with the advent of HTTP 1.1, 307 has replaced it as a valid temporary redirect. While a 302 is a little vague, a 307 states precisely that the requested URL has been moved to a temporary location and will be back in a while. Since this request can change in the future, the request should continue to be made using the original URL. Use this redirect if you’re sure the move is temporary and you’ll still need the original URL later on.
Not really redirects, but still relevant
As well as the traditional redirect codes, you’ll find two more that don’t really redirect. However, these are still relevant for day-to-day maintenance work on your site. You could see 410 and 451 as your server saying: Hey, there used to be something here, but not anymore.
410 Content deleted
404 error pages are one of the biggest problems on websites, and if you look at your readouts in Google Search Console, you are bound to find a few. These must be fixed as fast as possible because no-one likes these errors: Google sees them as a sign of bad maintenance, and visitors are confused by them. 404 errors often occur when the requested page or post has been deleted from the site and the URL has not been redirected.
Use a 301 to redirect pages showing 404 errors to a relevant page, or the homepage. Sometimes, however, you might prefer another method: telling search engines – and users – this page has been deleted with a 410 redirect. They will then know that the page won’t return and can, therefore, delete the page from the index.
451 Content unavailable for legal reasons
Should you ever be unlucky enough to be ordered by a judge to delete a page or if you get a notice and takedown request, give the deleted page a 451 header. This tells search engines that there was a post here and that you wanted to fulfill this request, but you can’t for legal reasons. Find out how and why to make a 451 header, should you ever find yourself in that situation.
If you’re a professional SEO and you need to do complex redirects, you may need to use REGEX redirects. With normal redirects, you specify a single source URL and a destination URL. With REGEX – regular expressions – redirects, you can, for instance, create a single redirect to move entire groups of URLs that include a keyword to a new location. This could save you a ton of time while working on a massive SEO project. However, you should only use REGEX redirects if you know what you are doing because they can easily break your site.
Manage redirects with Yoast SEO Premium
Of course you can fix your redirects on the server or use other tools, but, as a user of Yoast SEO Premium, you have the best possible tool to work with redirects at your disposal. The redirect manager in Yoast SEO Premium helps you set the correct redirect, and whenever you delete or move a page, Yoast SEO will ask you how to treat it: should it have a 301 or a 410 redirect? Or maybe a 451? The redirects manager supports 301, 302, 307, 410 and 451 redirects, all in an easy to manage workflow.
Working with redirects
Working with redirects is a daily job for many SEOs. This article has covered the different options for redirecting pages and shown you how and when to use them. But be careful when choosing your redirect! And don’t 302 your entire site when you’re moving to a new domain because you’ll cause serious problems down the line. Think about what you want to accomplish, and then pick the most appropriate redirect method.