What is a redirect?

Every page on the web has an address, a URL, which stands for ‘Uniform Resource Locator’. Sometimes, content moves from one URL to another URL. That’s when you need a redirect. A redirect automatically makes a browser go from one URL to another URL.

A redirect can point to any other URL: it doesn’t need to point to the same website. Redirects to another domain are sometimes referred to as cross-domain redirects.

Types of redirects

There are several ways of making a browser redirect. Redirects can be divided into two classes: serverside redirects and client-side redirects. Each of these can then be sub-divided into several types.

Serverside redirects

Serverside redirects are performed directly on the server and result in a tiny bit of content being sent to the browser, in so-called HTTP status headers. The browsers then know where to go and will follow immediately. These HTTP headers have a code for the type of serverside redirects, and a new location to which the browser should take you.

Browsers will cache a 301 redirect and immediately perform it again next time without needing to fetch the original URL again, until the cache is cleared. This is for instance the case with language or geo-location based redirects.Browsers will not cache a 302 redirect, so the server will be getting a request for the original URL every time.Search engines will follow the redirect, but maintain the old URL in their index. Because too many systems use a 302 by default, when a 301 should instead be used, search engines tend to treat long-standing 302s like 301s in many ways.Browsers will never cache 307 redirects.Search engines might not always follow 307 redirects as they’re deemed temporary.

Redirect type Use case Browser impact SEO Impact
301 A permanent redirect, used for when a page has moved or for when a page has been deleted and similar content can be found elsewhere. Search engines follow the redirect and will add the new URL to the index. Links pointing to the old URL will be counted towards the ranking of the new URL.
302 A temporary redirect, used for when a page needs to be temporarily moved, or for when the original URL should always be requested. 307 An “improved” temporary redirect, that will always be treated as temporary by search engines.
308 Hardly ever used, a 308 means “follow this redirect and never go to the old URL again”. Browsers will hard cache 308 redirects. Similar to a 301.

Client-Side redirects

A client-side redirect is the result of some code that runs in the browser and then redirects the ‘client’, the browser, to another URL. To be able to run that code, it needs to be sent to the browser first, and therefore this is always a slower solution. Client-side redirects should thus be prevented as much as possible.

There are two types of client-side redirects: the so-called meta refresh, which refreshes the page to another URL after a particular period of time, or a JavaScript redirect, which changes the window’s URL after that code has been run. The SEO impact of both types of client-side redirects is hard to quantify, but usually, it’s not as reliable as serverside redirects.

When to create a redirect

You should create redirects when:

  • You’re moving from one system to another and change URLs because of that.
  • You’ve deleted a page and there is similar content available elsewhere.
  • You’re merging the content of several pages into one.

Read more: Which redirect should I use? »

Become a Yoast SEO plugin expert!

  • Master the Yoast SEO plugin
  • Get the best settings for your site
  • Don’t miss out on awesome features
  • On-demand SEO training by Yoast
More info

7 Responses to What is a redirect?

  1. parastoo
    parastoo  • 2 months ago

    Good Plugin to redirect 404 errors. It’s a good thing. Good luck.

  2. Beach Resorts in Goa
    Beach Resorts in Goa  • 2 months ago

    Good Plugin to redirect 404 errors. you can also bulk upload option in pro .

  3. RSOFT
    RSOFT  • 2 months ago

    I am also i ever seen this type of explanation about this redirect. thanks a lot

  4. Wasim akram
    Wasim akram  • 2 months ago

    You have cleared my doubts on Redirects

    • Iris Guelen
      Iris Guelen  • 2 months ago

      That’s a good thing to hear, Wasim!

  5. Soneye Saheed
    Soneye Saheed  • 2 months ago

    I didn’t understand the differences between 301 and 302 redirects even though I see them very often(especially 301). After reading this post, I now understand them fully, plus I was able to predict their effects on SEO.

    Thanks for this guide.

    • Iris Guelen
      Iris Guelen  • 2 months ago

      Happy we could clear any confusion! You are very welcome :)


Check out our must read articles about Redirects