SEO

301 vs 302 Redirects: What Google Says to Use

By · · 3 min read

Short answerUse a 301 or 308 when a move is permanent and a 302, 303 or 307 when it is temporary. Google says permanent redirects signal that the target should be canonical, while temporary ones do not. Prefer server-side redirects, point straight to the final URL, and avoid sending old pages to an unrelated homepage.

Key takeaways

  • Google groups 301 and 308 as permanent and 302, 303 and 307 as temporary.
  • A permanent redirect is a signal that the target should be the canonical URL; a temporary one is not.
  • Server-side redirects are the type Google is most likely to interpret correctly.
  • Redirect straight to the final URL, keep chains short, and fix internal links instead of relying on redirects.
  • Google suggests keeping site-move redirects for at least about a year.

What is the difference between a 301 and a 302 redirect?

A 301 tells browsers and crawlers that a page has moved for good, and a 302 says the move is temporary. Google's documentation on redirects groups HTTP 301 and 308 as permanent, and 302, 303 and 307 as temporary. The choice matters mainly because of what it tells Google about which URL to show in results.

How does Google treat each type?

According to Google Search Central, a permanent redirect is used as a signal that the redirect target should be canonical. A temporary redirect is not: Google says the indexing pipeline does not treat it as a signal that the target should be canonical. In practice, per Google's description, permanent redirects tend to make the target the URL shown in results, while temporary ones tend to keep the source page showing. Google adds that the old URL then becomes an alternate name that may still appear for some queries. It also advises permanent redirects only when you are sure the redirect will not be reverted. Google's page does not discuss ranking effects, so this article makes no claim about them.

What do the status codes mean technically?

Mozilla's MDN guide describes permanent redirects as meant to "last forever" and notes that crawlers update the original URL, while temporary redirects are for when a resource is reachable from another place for now, and crawlers do not memorize the new URL. MDN also explains a method difference: for 301 and 302, non-GET requests may or may not be changed to GET depending on the client, which is why 308 and 307 were created. They preserve the method and body. 303 explicitly changes the request to GET, which suits redirecting after a form submission.

CodeType (per Google)Method handling (per MDN)
301PermanentNon-GET may change to GET
308PermanentMethod and body unchanged
302TemporaryNon-GET may change to GET
303TemporaryChanged to GET
307TemporaryMethod and body unchanged

Which redirect mechanism should you use?

Google's table of redirect methods is ordered by how likely Google is to interpret each correctly, and server-side redirects come first. A meta refresh is the next option: an instant one counts as permanent, and Google says it interprets a delayed meta refresh as temporary. For JavaScript, Google says to use it only if server-side or meta refresh redirects are not possible, and warns it might never see the redirect if rendering fails. For most business sites, that means setting redirects in your web server, CMS or hosting configuration rather than in page scripts.

How do you handle a site move or URL change?

Google's site move guidance recommends server-side permanent redirects where technically possible. It says to avoid chains by redirecting straight to the final URL, and if that is not possible, to keep chains short, ideally no more than three hops and under five. It also warns against sending many old URLs to an unrelated page such as the new homepage, because that can look like a soft 404. For duration, Google says to keep redirects for at least about a year, and users can be served by them indefinitely. It still suggests updating your own internal links and important external links to the new URLs. MDN makes the same practical point: each redirect costs an extra request, so fix internal links instead of relying on redirects.

The Change of Address tool in Search Console is only for moving between domains or subdomains, according to Google. It is not needed for HTTP to HTTPS, www to non-www, or path changes within a domain. Google also says rankings may fluctuate for weeks or longer during a move.

What should you check before launching redirects?

Confirm each old URL returns a single permanent hop to a closely matching new page, and test for loops, which MDN says break the user experience. Then monitor the Search Console sitemaps and indexing reports and your server logs, as Google suggests. This is informational analysis, and exact outcomes depend on your site and on how Google recrawls it.

Frequently asked questions

Is a 301 redirect better than a 302 for SEO?

Neither is better in general. Google says a 301 signals that the target should be canonical, so use it for permanent moves, and use a temporary redirect when the old URL will return.

Does Google treat 301 and 308 the same?

Google's documentation lists both as permanent redirects. MDN notes the difference is that 308 preserves the request method and body.

How long should I keep redirects after a site move?

Google's site move guidance says at least about a year, and users can keep being served by redirects indefinitely.

Can I use a JavaScript redirect?

Google says to use JavaScript redirects only if server-side or meta refresh redirects are impossible, because Google might never see them if rendering fails.

Sources

  1. Redirects and Google Search — Google Search Central
  2. Site move with URL changes — Google Search Central
  3. Redirections in HTTP — MDN Web Docs
KC
Kathy P. Carr

CEO of AIrecommend.ai and Skyview Business Consulting. Writes on answer engine optimization, franchising and building AI-first companies.

Connect on LinkedIn

Keep reading

Want to be the answer AI recommends?
See how AIrecommend.ai helps businesses get found and recommended by AI assistants.