What You (Probably) Don't Know About Redirects.

Most SEO's are taught the simple mantra that a 302 (temporary redirect) is bad, and a 301 (permanent redirect) is good.

This is wrong. Or at least, part of it is.

An SEO quoting the above to someone who is really knowledgeable in web servers will have just shot themselves in the virtual foot, and probably made their job harder, since now the server expert is more likely to dismiss other things they are saying as possibly oversimplified and misleading, too.

The Facts

The good news is that a 301 is usually what you want as an SEO, and you want to avoid 302's, so even though you may have been wrong in your ideas as to how things work, the net effect was probably correct, or at least, good enough.

As with many things that are "good enough, it works", most people never bother to look further. The rest of this article is for those who actually prefer to understand things, rather than those who just follow checklists blindly. The rest of you can stop here and be happy that 301's normally do the job you think they are doing.

A 302 actually isn't a Temporary Redirect

A 307 is. In reality, a 302 just means "Object Moved", or "Found", which, if accompanied by a target URL, browsers and servers interpret as a redirect. But with no target URL, they will happily stay there, and it's not an error.

In reality, a 303 is what most SEO's think a 302 is. A 303 means "See Other". A 307 is the actual Temporary Redirect. It really means temporary, as in the very next request should also be made to the old URL, and the new one should not even be cached. This is usually only used for emergency redirects (like when a primary server is down) and the like.

A302 doesn't dictate a redirect, it just says that what you were looking for moved, and it's been found there. You are usually redirected only as a courtesy and for usability purposes. Technically, you should use a 303, which really does the job properly.

The Problem With 301's

A pure 301 actually isn't always the best choice for a redirect, either. The problem is that a 301 is cachable, and therefore if you ever change that 301 to point to a second place, it may take quite a bit of time for the search engine to update it's files, which is why there is often a delay in you seeing results after changing 301's.

For example, let's say you 301 me.com to you.com. Then later you decide you want to change the me.com redirect to us.com. There can be a significant delay in this working, because the search engines will cache the original redirect for quite some time.

Want to fix this?

You can put a 301 on you.com as well as me.com, which will create a second hop in some cases, but will give you some time for the caches to be updated and speed up indexing, in some cases dramatically.

It's a simple fix, but it can save you a lot of time and headaches.

Want another fix? (Best Practice)

When you create 301 redirect, prevent it from being cached is there is a possibility that you will change it in the future.

If you don't think you'll be changing it, then just do what you usually do - it will cache automatically, which is normally a good thing.

If you might change it, or expect to change it, you can disable the cache in one of 2 ways in either the server response or the redirect page. Server response is better, IMO.

  • (BEST) use HTTP headers in the server response to send "Cache-Control: no-cache"
  • Or, if you can't do that on your server, you can use "Pragma: no-cache" option in your html redirect page header area. But real server headers are better than the pragma.
Redirect Codes

  • 300 Multiple Choices – HTTP_MULTIPLE_CHOICES
  • 301 Moved Permanently – HTTP_MOVED_PERMANENTLY
  • 303 See Other – HTTP_SEE_OTHER
  • 304 Not Modified – HTTP_NOT_MODIFIED
  • 305 Use Proxy – HTTP_USE_PROXY
  • 307 Temporary Redirect – HTTP_TEMPORARY_REDIRECT


Utah SEO Pro said...

depends on which HTTP protocol you're referring to

Ian McAnerin said...

@ Utah SEO Pro:

Although true, Search Engine Spiders use HTTP 1.1 rather than HTTP 1.0 because HTTP 1.1 allows them to see and access virtual domains, which are a substantial number of sites, and in some countries, consist of almost all the sites. HTTP 1.0 only allows you to access the one default domain on any given IP.

Because of this, for SEO purposes HTTP 1.1 is the only version of HTTP that matters, since it's the one used by search engines.

Adam said...

A 302 isn't "bad" if your intent is, in fact, to have a redirect in place that will only be temporary.

For example, if you have a promotions page that is only active at certain times of the year, you might want to redirect away from it when you have no promotions going on--but the last thing you'd want is a 301 sending away all your link juice and authority. You can't change your mind (sort of) later on and get that link juice back.

Choosing a redirect is not as simple as the whole "301s are better for SEO" thing. Don't lose sight of your business goals.