Skip to main content

301 vs 302 Redirect

301 redirects are permanent; 302 redirects are temporary. Choose 301 when the URL has moved for good. Choose 302 when the change is reversible.

301 Redirect

Tells search engines the page has permanently moved to a new URL. The original URL will be replaced in search results.

Use when:

  • You've permanently changed a URL
  • You're migrating to a new domain
  • You've consolidated multiple pages into one
  • You've moved from HTTP to HTTPS
  • You want to consolidate link equity to the new URL

302 Redirect

Tells search engines the page is temporarily available elsewhere. The original URL stays in the index.

Use when:

  • You're redirecting during site maintenance
  • You're A/B testing different page versions
  • You're showing location-based content
  • You need to preserve the request method (use 307)
  • The original URL will be restored later

When to use each

The decision is straightforward: if the redirect is permanent, use 301. If it’s temporary, use 302.

The confusion comes from real-world implementation. Many servers default to 302 when they should use 301. Apache’s Redirect directive uses 302 by default. Many CMS platforms use 302 for URL rewrites. This means search engines often receive 302 responses for permanent changes.

The problem with using 302 for permanent redirects

When Google sees a 302, it assumes the original URL is the canonical version. This means:

  • The original URL stays in the index instead of the new one
  • Link equity is not fully consolidated to the new URL
  • Search engines may periodically re-check the original URL
  • You may see unexpected URLs in search results

The problem with using 301 for temporary redirects

When you use 301 for a temporary change:

  • Search engines replace the original URL in their index
  • When you revert the change, search engines may not re-index the original URL quickly
  • You lose the flexibility to easily switch back

HTTP/1.1 status codes

HTTP/1.1 introduced 307 and 308 as more precise versions of 302 and 301:

  • 307 Temporary Redirect — Same as 302 but guarantees the request method doesn’t change
  • 308 Permanent Redirect — Same as 301 but guarantees the request method doesn’t change

In practice, 301 and 302 are sufficient for most SEO use cases. Use 307 when you need to preserve POST requests during a temporary redirect.

Decision flowchart

Ask yourself:

  1. Will this redirect ever be removed?
    • No → Use 301
    • Yes → Use 302
  2. Are you preserving the request method?
    • Yes, and it’s temporary → Use 307
    • Yes, and it’s permanent → Use 308
    • No → Use 301 or 302
  3. Are you unsure?
    • If you’re redirecting during a migration or URL change, it’s almost certainly permanent. Use 301.

Common mistakes

Using 302 for domain migrations

Domain migrations are permanent. Using 302 tells search engines the old domain is still the primary version, which can take months to resolve.

Using 301 for maintenance redirects

If you’re temporarily redirecting a page during maintenance, using 301 tells search engines the page is gone permanently. When you bring it back, search engines may not re-index it quickly.

Mixing status codes

If some URLs use 301 and others use 302 for the same type of change, search engines receive inconsistent signals. Standardize on one status code for each use case.

Try These Tools

Related Guides

Frequently Asked Questions

Does Google treat 302 redirects as 301?

Sometimes. Google has stated it may treat a 302 as a 301 if it detects the redirect is permanent. However, this is inconsistent and unreliable. Always use 301 for permanent redirects to avoid ambiguity.

Can I change a 302 to a 301 later?

Yes. You can change the status code at any time by updating your server configuration. Search engines will re-crawl the URL and update their index accordingly.

Do both 301 and 302 pass link equity?

301 redirects pass approximately 99% of link equity. 302 redirects may pass link equity, but this is inconsistent. For permanent moves, always use 301 to ensure equity is preserved.

Which should I use for A/B testing?

Use 302 (or 307) for A/B testing. The redirect is temporary, and you want search engines to keep indexing the original URL. Using 301 would tell search engines the test variant is permanent.