2

We have some legacy 302 redirects in place on our site that should have always been 301s. We've now changed the redirects to 301s but various SEO tools (and presumably Google) still see the 302 redirect rather than the 301.

My question is, how long do 302s normally get cached for (if there is a 'normally' in this situation)? And is there anything we can do to speed up the process of recognising the change to 301s?

3
  • 3
    How do you know that Google is still seeing them as 302 redirects? Are you using the "Fetch as Google" feature of Google Webmaster Tools? Commented Jun 27, 2014 at 11:06
  • Sorry, should have said ''and presumably Google'. The 302s are repointing from a legacy domain that doesn't have Webmaster set up. My guess is that Google's 301s and 302s will remain until they recrawl the domain?
    – Willl
    Commented Jun 27, 2014 at 12:51
  • Give the "fetch as Google" a try. How long has it been since you switched the redirect type? Has it been enough time for these tools to recrawl your site? Commented Jun 27, 2014 at 13:34

1 Answer 1

3

302 Caching

A 302 response code would only be cached if accompanied with the Cache-Control or Expires headers. There is no explicit or embedded cache information within a 302 response.

According to RFC 2616, section 10.3.3 302 Found

The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.

Verify 301 Response

I recommend you verify that you are indeed sending the expected 301 HTTP responses. You can use:

curl -I http://www.domain.com/

to see the headers being returned.

Alternatively, you can use http://redbot.org to explore HTTP headers as well.

If you are certain you are sending the correct headers, then Google will see these on its next visit.

Check Logs

You can then check your logs to see if Googlebot has visited the pages with the updated headers. If it has, then it should pick up the 301 response.

Once this is done, the change should be included in the next search engine update.

1
  • Amazing. Thanks. Redbot.org shows that the 301s are in fact in place so now we just need to wait for Google to turn up! Great tip.
    – Willl
    Commented Jun 27, 2014 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.