which redirect - delete a page

Which redirect should I use?

Which redirect should I use?

As an SEO or site owner, you are bound to run into redirects. Whenever you delete a page, change your URL structure or switch to a new domain, you are going to have to redirect your URLs. You have to tell search engine robots that there has been a change in your URLs and that they have to go somewhere else, temporarily or permanently. Choosing a particular redirect might impact your SEO, so be careful what you pick. In this article, we’ll give a brief of which redirect you could use.

Reasons to use redirects?

If you’re maintaining your site on a regular basis, your tasks include the redirection of URLs. There are many cases when you might use a redirect, but the following will pop-up often. You’ll need a redirect when you:

  • Delete a page or post
  • Transfer your site to a new domain
  • No longer want to use www in your domain
  • Enable permalinks in WordPress
  • Merge websites
  • Change your CMS
  • Change your URL structure
  • etc.

Become a technical SEO expert with our Technical SEO 1 training! »

Technical SEO 1 training Info

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. A 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 instance. All codes serve 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.

If you want to maintain your site without fault, you need to know your HTTP status codes. Read up on them in the article 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. These are the ones you should remember:

  • 301 Permanent redirect
  • 302 Found
  • 307 Temporary redirect

Not really redirects, but useful nonetheless:

  • 410 Content deleted
  • 451 Content unavailable for legal reasons

301 Permanent redirect

The 301 is one of the most common redirects; use this if you permanently want to redirect a deleted or moved page, or if you’ve changed something in your permalink structure. Using this redirect, you’ll tell search engine robots that this page is no longer available in this location and that it should no longer be indexed. If you don’t set a redirect correctly, chances are your visitors – and crawl bots – will see 404 error messages. That’s not something you want happening.

Since a 301 permanently leads visitors from the old URL to a new one, you should only use this if you’re sure that you’ll never use the old URL again. If you want to use the URL again, you need a temporary redirect. 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 gain or retain value. If you want to learn how to implement your 301 redirects with WordPress, you can read this post by Jimmy or just use the redirects manager of Yoast SEO Premium.

302 Found

A 302 is a fairly ambiguous redirect and is often used to make a temporary redirect. The code means that the requested content is found, but it lives under a different location. Why? It doesn’t say. If you want to make sure visitors get to an alternative page when visiting this particular page, and you want to reuse the URL in the future, you can 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. Don’t use it when moving a site to a new domain or when you’re doing other large-scale renovations on your site.

307 Temporary redirect

302s are often used to create temporary redirects, but with the advent of HTTP1.1 307 has taken its place as a valid temporary redirect. A 307 explicitly states 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 has to keep being made with the original URL. Use this redirect if you’re sure that the move is temporary and that you’ll still need the original URL later on.

Not really redirects, but still

Besides the traditional redirects, you’ll find two more that don’t really redirect. However, these are still relevant for your day-to-day maintenance work on your site. You could see 410 and 451 as a message from your server saying: Hey, there used to be something here, but not anymore.

410 Content deleted

One of the biggest problems on sites is the amount of 404 error pages. If you look at your readouts in Google Search Console, you are bound to run into 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 get confused by them. 404 errors often occur when the requested page or post was deleted from the site.

You can use a 301 to redirect the page with the 404 to a relevant page, or the homepage, but in some cases you might prefer another way: tell search engines – and users – this page was correctly deleted with a 410 redirect. This way, they 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 ordered by a judge to delete a page or in case you get a notice and takedown request, you should give this page a 451 header. This way, you tell search engines that there was a post here and that you wanted to fulfill this request, but some legal reason told you not to do so. Find out how and why to make a 451 header, should you ever find yourself in that situation.

REGEX redirects

If you’re an expert SEO and you need to do complex redirections, 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, make a single redirect to move entire groups of URLs with 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.

Optimize your site for search & social media and keep it optimized with Yoast SEO Premium »

Yoast SEO: the #1 WordPress SEO plugin Info

Manage redirects with Yoast SEO Premium

Now, in all fairness: you are free to fix your redirects on the server or use other tools to help you. However, as a user of Yoast SEO Premium, you have the best possible tool to work with redirects at your disposal. The redirects manager of Yoast SEO Premium helps you to set the correct redirect. Whenever you delete or move a page, Yoast SEO will ask you how to treat this page: should it get a 301 or a 410? 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. In this article, you’ve discovered the different options to redirect pages and learned how and when to use these. Be careful when choosing your redirect! You don’t want to, for instance, 302 your entire site when you’re moving to a new domain. This will lead to serious problems down the line. Think about what you want to accomplish and pick the most appropriate redirect method.

Read more: ‘How to properly delete a page from your site’ »

11 Responses to Which redirect should I use?

  1. Somenath Sen
    By Somenath Sen on 25 July, 2017

    Normally I use 301 redirect, it give me most of the SEO juice. but after reading this post i’m now think about REGEX redirects. This redirects is new to me.

  2. Hindi Shayari
    By Hindi Shayari on 25 July, 2017

    Thanks for sharing amazing info with us

  3. TechEfeed
    By TechEfeed on 24 July, 2017

    One can improve the visitor experience by using these redirects. Glad to read the post and keep sharing with us.

  4. sahil saini
    By sahil saini on 23 July, 2017

    nice one now i know all about redirection thankyou

  5. Carsten Meiselbach
    By Carsten Meiselbach on 23 July, 2017

    Hello Edwin,
    big thanks for this nice and great overview! Always good to follow Blog posts on yoast.com.

    I recently change my (WordPress Blog) URL structure by removing the trailing /category/ slug. I’ve done this by using Yoast SEO for WordPress, setting a redirect (Regex) for all requests from /category/(.*) to /$1, using HTTP 301 (permanent) redirects.

    After this I experenced some unexpected things:
    – a top ranked keyword “Low Carb Frühstück” (Breakfast recicpes) was droppped from place 1 (Google Germany, Desktop and Mobile involved) to nowhere. Two days later in come back to place 4. Sitelinks seen before the URL change where gone.
    – Google Search Console starts to show HTML problems for double title and description meta data for pages with old /category/ and without the slug.

    I was really disappointed about this effect. I’m sure i used the correct techniques including the important HTTP 301 for the redirect. I didn’t change any of the page URLs, only the Category entry points were involved.

    Entry page I’m talking about:
    Google Germany Keyword: “Low Carb Frühstück”

    Did somebody have the made the same experience here?

    Kind regards,


    • Edwin Toonen
      By Edwin Toonen on 25 July, 2017

      Hi Carsten. I think you’ve experienced an expected hiccup after making a rather large change to your site. Google has to adjust to this change and that will lead to some differences in ranking. I’ve just checked google.de and you’re back on top with your keyword. Good work!

      • Carsten Meiselbach
        By Carsten Meiselbach on 25 July, 2017

        Yep, within the Top 4. But still a problem loosing the Featured Entry with Sitelinks. Thats the way Google goes…
        Kind regards.

  6. Android
    By Android on 23 July, 2017

    410 and 451 redirects are new to me. Haven’t heard about them previously, but I know about them.

  7. Desert
    By Desert on 22 July, 2017

    I was very illiterate about Redirect, but now i have good knowledge. Good post. Thanks

  8. Cristhian Martínez
    By Cristhian Martínez on 20 July, 2017

    Can you please give a practical example of 302 vs 307?

Check out our must read articles about Technical SEO