Skip to content
MrKeyword
Technical SEO

301 vs 302 redirects: which should you use for SEO?

A redirect sends visitors and crawlers from one URL to another. Choose a permanent redirect for a lasting move and a temporary redirect when the original URL will return. Then check the path to the destination for chains and loops.

A website analytics dashboard on a desktop monitor
The short version
  • Use a 301 or 308 for a permanent move and a 302 or 307 for a temporary change.
  • A 307 or 308 preserves the request method when the client follows the redirect.
  • Google uses a permanent redirect as a signal to make the target canonical; a temporary redirect does not provide that same signal.
  • Point old URLs directly at the final destination to avoid extra hops, and fix loops that never reach a destination.
  • Update internal links and sitemaps to use the final URLs, then test the redirects.

What do 301, 302, 307 and 308 mean?

A 301 or 308 says a URL has moved permanently; a 302 or 307 says the redirect is temporary. These HTTP status codes accompany a destination in the response's Location header. A browser or crawler can follow that address to reach the next page.

  • 301 Moved Permanently: use when the old URL has a lasting replacement.
  • 302 Found: use when the original URL should return after a temporary change.
  • 307 Temporary Redirect: a temporary redirect that preserves the request method.
  • 308 Permanent Redirect: a permanent redirect that preserves the request method.

For example, a client following a 307 or 308 must keep a POST request as POST. With 301 or 302, a client may change POST to GET. The distinction matters for forms and APIs as well as pages. See the HTTP specification for the status-code rules.

How do redirects affect Google rankings?

Google treats a permanent redirect as a strong signal for the target URL to be canonical; a temporary redirect gives the target a weaker canonical signal. Google's redirect documentation explains that Google follows both types, but does not use a temporary redirect itself as a signal that the target should be canonical. Other signals can still lead Google to choose the target.

Google says 301 and other permanent redirects do not cause a loss of PageRank, and that signals are transferred during a site move. A redirect is not a promise to preserve the same ranking: Google must recrawl the URLs, and rankings may fluctuate during a move. A temporary redirect is appropriate when you want the original URL to remain in search while the change lasts.

Google recommends server-side redirects when possible. An instant meta refresh is interpreted as permanent and a delayed one as temporary; Google recommends JavaScript redirects only when server-side or meta refresh redirects are not possible. These alternatives are less reliable for Google to interpret than server-side redirects.

Which redirect should you use?

Match the redirect to whether the original URL is coming back, and use 307 or 308 when the request method must stay unchanged.

SituationRedirectReason
Site move or domain change301 or 308The new URL is the lasting destination.
HTTP to HTTPS301 or 308Send the old address to its permanent HTTPS equivalent.
Merged pages301 or 308Send each old page to the relevant consolidated page.
A/B test302 or 307The alternate page is a temporary test.
Temporarily out-of-stock item302 or 307Use a relevant temporary destination if the product URL will return.
Short promotion302 or 307The original URL is expected to return after the promotion.

For a permanent move, map each old URL to its closest relevant replacement. If a page has no replacement, return a 404 or 410 rather than sending visitors to an unrelated page.

What are redirect chains and loops?

A redirect chain has multiple hops before the final page; a loop sends requests back to a URL already visited and never reaches a final page. For example, /old redirects to /middle, which redirects to /new. A loop would send /old to /middle and then back to /old.

Point every old URL directly to the final destination where possible. Each additional hop adds latency, and long chains may not be followed by every client. Google also recommends avoiding chains during site moves.

Enter any URL in the free redirect checker to see the hops and status codes. Check that the last URL is the intended live page; if the path loops, correct the conflicting rules and test again.

What redirect mistakes should you avoid?

Avoid irrelevant destinations, accidental temporary redirects, extra hops and links that still point to old URLs.

  • Sending every old page to the home page. Google says many redirects to an irrelevant destination can be treated as soft 404s. Redirect to a relevant replacement instead.
  • Leaving a 302 in place for months. Review temporary rules and their purpose. If the move is permanent, use a permanent redirect; do not change a 302 solely because it is old if the change remains temporary.
  • HTTP to HTTPS to www in two hops. Configure the old address to reach the preferred HTTPS host in one hop, and test each host and protocol variant.
  • Keeping redirected URLs in the current sitemap. List the final URLs in your new sitemap and use the sitemap validator to inspect it. During a migration, Google notes that warnings for an old sitemap containing redirects are expected.
  • Leaving old URLs in internal links. Update links to the final destinations so visitors and crawlers do not need the extra redirect.

How do you check redirects across a site?

Crawl the site, review redirect findings, and test representative old URLs and their final destinations. Start with the free site audit tool, then use the redirect checker on individual URLs where you need to inspect the path. A crawl can only report URLs it reaches, so also test important old URLs from sitemaps, links and migration records.

Use the HTTP header checker to inspect a response's headers, including its status and redirect location. After fixing rules, repeat the checks and update your internal links and sitemap.

Questions and answers

301 vs 302 redirects questions

Is a 301 or 302 better for SEO?

Use a 301 for a permanent move and a 302 for a temporary change. Google uses a permanent redirect as a signal to select the target as canonical; a temporary redirect does not provide that signal.

Do 301 redirects lose PageRank?

Google says 301 and other permanent redirects do not cause a loss of PageRank. Rankings can still fluctuate while Google processes a site move.

What is a redirect chain?

A redirect chain is a sequence of redirects before the final destination. Point old URLs directly to the final page when possible to reduce hops.

What is the difference between 307 and 302?

Both are temporary redirects. A client following a 307 must preserve the request method, while a client may change a POST to GET when following a 302.

When should I use a 308 redirect?

Use a 308 for a permanent move when the client must preserve the request method when following the redirect.

About this article

Written by the MrKeyword team, who build an SEO workspace on first-party Search Console and Bing data. Outside facts link to their original source below. We update this page when the product or the sources change.

Sources

  1. Redirects and Google Search — Google Search Central, on redirect types and canonicalization
  2. Site moves and migrations — Google Search Central, on redirects, chains, PageRank and migration checks
  3. HTTP Semantics — RFC 9110, on HTTP redirect status codes and request methods
Keep reading

More on technical SEO, plus the feature and free tool for the same job. All technical SEO guides →

Check where your redirects lead.

See the status codes and hops on a URL's path with the free redirect checker. Free plan for one website, no card; paid plans from $10 a month.