301 vs 302 Redirects Which to Use and the SEO and AI Crawl Impact

Written By : admin || Published : November 16, 2026 || Last Updated : November 16, 2026

Use a 301 redirect when a page has moved permanently, and a 302 redirect when the move is temporary. A 301 tells browsers and search engines that the old URL is gone for good and the new one should replace it. A 302 says the original URL will come back, so it should stay in the picture. Most SEO problems around redirects come from using the wrong one, stacking several together, or leaving a temporary redirect in place for years.

This guide explains the difference between a 301 and a 302 redirect, how each affects rankings and indexing, what the 307 and 308 codes are for, and what to consider now that AI crawlers fetch your pages too. You’ll also get a practical checklist, copy-ready server examples and a testing routine.

permanent move, domain change, HTTPS switch or merged page: use 301 (or 308). Short-term test, maintenance page, A/B test or seasonal swap: use 302 (or 307). If you’re unsure, ask whether the old URL will ever be the main one again. If not, it’s permanent.

What a redirect actually does

When a browser or crawler requests a URL, the server answers with a status code. A redirect is a 3xx response that points the requester to a different URL through a Location header. The visitor usually barely notices. A crawler, however, reads the code to decide what to do with the old address: keep it, replace it, or check back later.

That’s the whole reason the code matters. The destination can be identical, and the signal you’re sending is not.

301 vs 302 at a glance

301 Moved Permanently302 Found (temporary)
MeaningThe page has moved for goodThe page is elsewhere for now
Which URL search engines prefer to indexUsually the new URLUsually the original URL, at least at first
Typical useSite migrations, URL changes, HTTPS, merged pagesShort tests, maintenance, geo or device routing, temporary promotions
Browser cachingOften cached for a long timeUsually not cached long
Risk if misusedHard to undo if browsers cached itOld URL may stay indexed; signals may be unclear

Google has said that both 301 and 302 redirects can pass ranking signals, so the old idea that a 302 “loses link value” isn’t a safe rule. The difference lies in which URL the search engine chooses to show and how quickly it switches.

Where 307 and 308 fit in

Two newer codes are stricter versions of the same idea. They matter mostly when a request isn’t a simple page view, such as a form submission.

CodeMeaningClosest toKey difference
301Moved permanently308Older clients may change a POST request into a GET
302Found (temporary)307Older clients may change a POST request into a GET
307Temporary redirect302Keeps the original request method
308Permanent redirect301Keeps the original request method

For ordinary page redirects, 301 and 302 are fine and widely supported. Use 307 or 308 when you need the method preserved, which is common for APIs and forms. You may also see 307 appear automatically when a browser enforces HTTPS using HSTS. That’s normal.

When to use a 301 redirect

Choose a 301 when the old URL has no future as the main address.

  • Site or domain migration. Moving from olddomain.com to newdomain.com.
  • HTTP to HTTPS. Sending every insecure URL to its secure version.
  • URL structure changes. Renaming a folder, changing a slug or removing a file extension.
  • Merging pages. Combining two overlapping articles into one stronger page.
  • Canonical host choice. Forcing www to non-www, or the other way around.
  • Retiring a product with a close replacement. Redirect to the nearest equivalent, not to the homepage.

The main benefit is clarity. A 301 tells search engines to consolidate signals on the new URL and, over time, to drop the old one from the index.

When to use a 302 redirect

Choose a 302 when you plan to bring the original URL back or you’re just testing something.

  • Temporary maintenance or downtime pages. Though a 503 status with a Retry-After header is often better for real downtime.
  • A/B tests. Sending some visitors to a variant URL.
  • Seasonal or promotional swaps. Pointing a main URL to a campaign page for a few weeks.
  • Geo or language routing. Sending visitors to a regional version, as long as you also support proper alternate-language markup and don’t block crawlers from seeing all versions.
  • Out-of-stock items you expect to restock soon.

A 302 is a promise that you’ll revert. If you never do, change it.

The SEO impact of getting it wrong

The consequences are usually gradual, not dramatic. But they add up across a large site.

Using a 302 for a permanent move. Search engines may keep the old URL in results, split signals between the old and new addresses, or take longer to switch. Google has also said that a long-lasting 302 can eventually be treated as permanent, but you shouldn’t rely on that.

Using a 301 for a temporary change. Browsers can cache a 301 aggressively, so visitors may keep landing on the temporary page even after you remove the redirect. Search engines may also start replacing the original URL with the temporary one.

Redirect chains. URL A goes to B, then to C, then to D. Each hop adds delay and wastes crawl effort. Google follows a limited number of hops, and other crawlers may follow fewer. Keep redirects to a single hop wherever possible.

Redirect loops. A points to B and B points back to A. Users see an error and crawlers give up.

Redirecting everything to the homepage. When the destination isn’t relevant to the old page, search engines may treat it like a soft 404, and visitors get confused.

Redirecting away useful pages without a replacement. If no equivalent exists, a 404 or 410 can be the more honest and cleaner answer.

What about AI crawlers?

AI assistants and their crawlers now fetch web pages too, whether to build search indexes, to answer live questions or for other purposes. The details differ by company and change over time, so treat the following as sensible practice rather than guaranteed behavior.

  • Use standard HTTP redirects. Server-side 301 and 302 responses are the most widely understood. Redirects that depend on JavaScript or a meta refresh are less reliable, because some crawlers don’t run scripts.
  • Keep redirects short. A crawler with a tight time budget may give up after a few hops, so single-step redirects are safer.
  • Update internal links. Link directly to the final URL so crawlers don’t need to follow a redirect at all.
  • Make sure redirect targets are accessible. If the destination blocks bots, sits behind a login or returns an error, both search and AI systems lose the page.
  • Keep one clear version of each page. If AI tools cite your old URL, a 301 helps them eventually reach the right one, but the citation may take time to update.
  • Check your robots.txt on both hosts. After a migration, a leftover disallow rule on the new domain can block the pages you just redirected to.

There’s no evidence that a 301 or 302 on its own decides whether an AI tool mentions you. The practical goal is simple: make it easy for any crawler to get from the old address to the right content, quickly and without errors.

How to set up a redirect

The exact method depends on your server or platform. Here are two common examples, simplified. Test on a staging site before going live.

Apache (.htaccess), permanent redirect for a single page:

Redirect 301 /old-page https://example.com/new-page

Nginx, permanent redirect for a single page:

location = /old-page {

  return 301 https://example.com/new-page;

}

For a temporary redirect, swap 301 for 302. Most content management systems and ecommerce platforms also provide a redirect manager or plugin. If you use one, check which status code it applies by default, since some tools default to 302.

A migration checklist for permanent moves

  1. List every old URL, including images, PDFs and parameters that matter.
  2. Map each old URL to the closest relevant new URL. Avoid blanket homepage redirects.
  3. Implement 301 redirects, one hop each, with no chains.
  4. Update internal links, canonical tags, sitemaps and structured data to the new URLs.
  5. Keep the old domain or URLs redirecting for at least a year, ideally longer.
  6. In Google Search Console, submit the new sitemap and use the Change of Address tool when moving domains.
  7. Check robots.txt, noindex tags and security rules on the new site.
  8. Monitor crawl errors, indexed pages and traffic for several weeks.

How to test your redirects

Don’t assume the redirect works because the page loads.

  • Command line. Run curl -I https://example.com/old-page and read the status code and Location header. Add -L to follow the whole path and count the hops.
  • Browser developer tools. Open the Network tab and watch the sequence of requests.
  • Crawling tools. Tools like Screaming Frog or Sitebulb flag chains, loops and wrong status codes across the whole site.
  • Search Console. Use the URL Inspection tool to see how Google treats a specific address, and the Pages report to find redirect-related issues.

Run a test after every major change, and again a few weeks later.

Common mistakes and quick fixes

MistakeWhy it hurtsFix
302 left in place after a permanent moveOld URL may stay indexedSwitch to 301 or 308
Redirect chains after multiple redesignsSlower crawling, lost timePoint every old URL straight to the final one
Redirecting all old pages to the homepageRelevance lost, may be seen as soft 404Map to relevant pages or return 404 or 410
JavaScript or meta refresh used instead of a server redirectSome crawlers miss itUse server-side redirects
Internal links still point to redirected URLsExtra hops on every visitUpdate links to the final URL
Redirects removed after a few weeksOld backlinks and bookmarks breakKeep them for at least a year

Before you publish this under your name, add something only you have: a screenshot of a real redirect test, a before-and-after from a migration you handled, or a short note about a mistake you made and fixed.

Conclusion

The 301 versus 302 choice isn’t complicated once you ask one question: will the old URL ever be the main address again? If not, use a permanent redirect. If yes, use a temporary one, and set a reminder to remove it. Keep chains short, map pages to relevant destinations, update internal links and test after every change.

Do that, and you’ll protect your rankings, keep crawlers moving smoothly, and give both search engines and AI tools the clearest possible path to your cont

Frequently asked questions

1. What is the main difference between a 301 and 302 redirect?

A 301 signals a permanent move, so search engines should replace the old URL with the new one. A 302 signals a temporary move, so the original URL is expected to return and usually stays the preferred address.

2. Does a 302 redirect pass link equity?

Google has indicated that both 301 and 302 redirects can pass ranking signals. The difference is mostly about which URL gets indexed and shown. Still, for permanent changes, a 301 is the clearer and safer choice.

3. Is a 301 redirect better for SEO than a 302?

Not universally. Each fits a different situation. A 301 is better for permanent moves, and a 302 is better for temporary ones. Using the right one avoids confusion over indexing.

4. How long should I keep a 301 redirect in place?

At least a year, and longer if the old URLs still have backlinks, bookmarks or traffic. Removing redirects too early can break links and cause lost visibility.

5. Can a 302 redirect become permanent?

If a 302 stays in place for a long time, search engines may eventually treat it as permanent. Don’t depend on that. If the move is permanent, change the code to 301 or 308.

6. What’s the difference between 301 and 308 redirects?

Both mean permanent. A 308 requires the browser to repeat the same request method, such as POST, while older handling of a 301 may switch it to GET. For normal page redirects, a 301 works fine.

7. What’s the difference between 302 and 307?

Both mean temporary. A 307 preserves the original request method, while a 302 may be handled as a GET by some clients. Use 307 when the method matters, such as for form or API requests.

8. How many redirects in a row are too many?

Aim for one. Google can follow several hops, but each one adds delay and risk, and other crawlers may follow fewer. If you find chains, update the first URL to point directly to the final destination.

9. Do AI crawlers follow 301 and 302 redirects?

Many crawlers follow standard server-side redirects, but behavior varies by company and can change. Server-side redirects are the safest option, and JavaScript-based redirects are less reliable. Check each platform’s documentation if it matters for your site.

10. Should I use a redirect or a canonical tag?

Use a redirect when the old URL should no longer be visited. Use a canonical tag when both URLs must remain accessible but you want to signal a preferred version. A redirect is a stronger, more direct instruction.

Frequently asked questions

1. What is the main difference between a 301 and 302 redirect?

A 301 signals a permanent move, so search engines should replace the old URL with the new one. A 302 signals a temporary move, so the original URL is expected to return and usually stays the preferred address.

2. Does a 302 redirect pass link equity?

Google has indicated that both 301 and 302 redirects can pass ranking signals. The difference is mostly about which URL gets indexed and shown. Still, for permanent changes, a 301 is the clearer and safer choice.

3. Is a 301 redirect better for SEO than a 302?

Not universally. Each fits a different situation. A 301 is better for permanent moves, and a 302 is better for temporary ones. Using the right one avoids confusion over indexing.

4. How long should I keep a 301 redirect in place?

At least a year, and longer if the old URLs still have backlinks, bookmarks or traffic. Removing redirects too early can break links and cause lost visibility.

5. Can a 302 redirect become permanent?

If a 302 stays in place for a long time, search engines may eventually treat it as permanent. Don’t depend on that. If the move is permanent, change the code to 301 or 308.

6. What’s the difference between 301 and 308 redirects?

Both mean permanent. A 308 requires the browser to repeat the same request method, such as POST, while older handling of a 301 may switch it to GET. For normal page redirects, a 301 works fine.

7. What’s the difference between 302 and 307?

Both mean temporary. A 307 preserves the original request method, while a 302 may be handled as a GET by some clients. Use 307 when the method matters, such as for form or API requests.

8. How many redirects in a row are too many?

Aim for one. Google can follow several hops, but each one adds delay and risk, and other crawlers may follow fewer. If you find chains, update the first URL to point directly to the final destination.

9. Do AI crawlers follow 301 and 302 redirects?

Many crawlers follow standard server-side redirects, but behavior varies by company and can change. Server-side redirects are the safest option, and JavaScript-based redirects are less reliable. Check each platform’s documentation if it matters for your site.

10. Should I use a redirect or a canonical tag?

Use a redirect when the old URL should no longer be visited. Use a canonical tag when both URLs must remain accessible but you want to signal a preferred version. A redirect is a stronger, more direct instruction.

About the Author

admin