Skip to the content
Start free

301 vs 302 redirect: which to use

A 301 redirect tells browsers and search engines that a page has moved for good; a 302 redirect says the move is only temporary. Google uses a permanent redirect as a sign that the new address should be the one shown in results, and does not with a temporary one. If the move will not be reversed, use a 301 (or a 308). If the old page is coming back, use a 302 (or a 307).

What is a redirect? #

A redirect is a server reply that says “this page now lives over there”. It is a status code in the 300s plus a Location header with the new address. The browser follows it without the visitor doing anything. MDN’s redirections guide says users rarely notice one, apart from the small cost of an extra round trip. Search engines, AI crawlers and other bots read the code itself, and the code is what tells them how long the move will last.

What is the difference for Google? #

Codes Type What Google treats as canonical
301, 308 Permanent The new (target) URL
302, 303, 307 Temporary Usually the old (source) URL

This is how Google describes redirects. With a temporary redirect, the target can still be indexed if other canonical signals point to it. Google’s page on HTTP status codes puts it another way: a 301 is a “strong” signal that the target should be processed, a 302 or 303 is a “weak” one, a 307 equals a 302 and a 308 equals a 301. See canonical tag for the other signals.

The choice decides which address appears in results. A permanent redirect moves the old page’s place to the new one. MDN’s 301 page says search engines attribute links to the original address to the new one, passing the ranking across. Its 302 page says the opposite for a temporary move. So the wrong code can leave your backlinks and link juice pointing at a page you have retired.

Why does it matter for AI answers? #

AI crawlers and live fetchers read the same status codes. An assistant may have learned or cited an old address. The redirect is what connects that citation to your live page. MDN says crawlers update the original address after a permanent redirect, but do not memorise a temporary one. So a permanent move made with a 302 can keep old addresses alive in bots’ records for longer. One clean permanent hop is the safe choice.

Which one should I use? #

Use a permanent, server-side redirect when you are sure the move will not be reversed: a renamed page, two articles merged into one, a move to https. Use a 302 for short-term moves, such as a seasonal page or a page that is out of action for a while. MDN’s examples match: 301 for “reorganization of a website”, 302 when a page “is temporarily unavailable”. If in doubt, ask one question: will the old address ever show its own content again? If not, it is permanent.

What about 307, 308 and 303? #

They fix an old problem with forms. Browsers may turn a POST into a GET after a 301 or 302. 308 is the permanent redirect that keeps the method and body. 307 is the temporary one that does the same. MDN says 307 and 302 behave the same for a GET. 303 sends the visitor to a different page with a GET, which is useful after a form so a refresh does not send it twice. For normal pages, 301 and 302 are fine.

Which kinds of redirect does Google read most reliably? #

Google lists methods by how likely it is to read them correctly: server-side first, then meta refresh, then JavaScript, then a “crypto” redirect, which is a plain link saying “we have moved”. It reads an instant meta refresh as permanent and a delayed one as temporary. JavaScript redirects are the last resort, because Google may never see one if rendering fails. See JavaScript SEO. MDN adds that HTTP redirects run first, before any page is sent.

What does it look like? #

Google’s examples for an Apache server, one permanent and one temporary:

Redirect permanent "/old" "https://example.com/new"
Redirect temp "/two-old" "https://example.com/two-new"

And for NGINX:

return 301 $scheme://example.com/about/service
return 302 $scheme://example.com/about/service

This is what a real 301 looks like from the outside, in MDN’s own example. The status line says 301 and the location header gives the new address:

HTTP/2 301
cache-control: max-age=2592000,public
location: /en-US/docs/Learn_web_development/Core/Scripting/Network_requests
content-type: text/plain; charset=utf-8
date: Fri, 19 Jul 2024 12:57:17 GMT
content-length: 97

Moved Permanently. Redirecting to /en-US/docs/Learn_web_development/Core/Scripting/Network_requests

Note the cache-control line: a redirect can be cached at the edge cache like any other reply.

A worked example #

A bike shop renames its page /helmets.html to /helmets/ for good, and runs a winter sale page for six weeks.

Old address Goes to Code Why
/helmets.html /helmets/ 301 Renamed for good
/sale/ /winter-sale/ 302 The normal sale page returns in spring
/contact-form (POST) /contact/ 308 Permanent, and the form data must survive

The shop then changes its menus, internal links and XML sitemap to /helmets/, so most visits need no redirect at all.

Common mistakes #

  • A 302 for a move that is for good. Google then usually keeps the old address as the canonical, so the new one may not take its place in results.
  • Chains of redirects. An old http address goes to https, then to the www version, then to the new slug: three hops where one would do. Google’s crawlers follow up to 10 hops by default. Its crawl budget guide warns that long chains hurt crawling. Point every old address straight at the final one. See redirect chain and crawl budget.
  • A delayed meta refresh (“you will be taken to our new page in 5 seconds”). Google reads it as temporary, so use a server redirect if the move is permanent.
  • Loops. MDN says loops completely break the user experience. The server may send a 500 error, or the browser shows its own.
  • Removing redirects too soon. For a site move, Google’s site move guide says keep them generally at least 1 year, and for people, consider keeping them for good.
  • Redirecting everything to the home page. Send each old page to its closest new match. If there is none, a 404 or 410 is honest; a page that says “not found” but returns 200 is a soft 404.

How to check it #

  1. Paste the old address into our free Redirect Checker. It shows every hop, whether each is a 301 or a 302, and any loop. The Redirect Checker guide explains the results.
  2. Try all four forms of your home page: http and https, with and without www. Each should reach the final address in one permanent hop.
  3. Read the raw reply, including the Location and cache headers, with the HTTP Header Checker. The Edge Cache Checker will show if the redirect itself is cached.
  4. Find links on your pages that still point at old addresses with the Broken Link Checker, then change them to the final address. See broken link and anchor text.
  5. Make sure your sitemap lists only final addresses with the XML Sitemap Checker.
  6. Check that the final page’s canonical names itself with the Canonical Tag Checker, and that it can be indexed with the indexability checker. See noindex.
  7. Check that robots.txt does not block the new address, with the Robots.txt Checker.
  8. In Google Search Console, old addresses show as page with redirect, which is normal. Use URL Inspection on the new address. Google notes its inspection tools do not follow redirects, so inspect the final page, not the old one.
  9. Compare your setup with a rival’s in Compare Two Websites, or run the SEO Audit across 100 pages.
  10. Planning a bigger move? Read how to move a website without losing traffic. The migration redirect mapper, redirect monitor, links-to-redirects fixer and 404 rescue are in URSY Pro, opening in stages.

What URSY.com counts #

We record every request with its status code, from both the edge log and the origin. So a redirect shows up as its own request, a 301 or a 302, followed by the request for the next address. A bot that follows two hops makes three requests for one page; we count reads, not pages. Edge figures for the last hour are incomplete, because the edge log arrives about 8 to 10 minutes late. See our methodology.

Questions #

Does a 301 lose ranking? #

Google treats a 301 as a strong signal that the new address should be canonical. Expect some movement during a move: Google’s site move guide says rankings fluctuate for a while, then settle.

Can I change a 302 to a 301 later? #

Yes. Once you know the move is for good, switch it. Google will then treat the target as the canonical.

Is a 308 better than a 301? #

Google treats them the same. A 308 also keeps a form’s method and body, so it is the safer permanent code for anything that is not a plain page view.

How long should I keep a 301? #

For a site move, Google says generally at least one year. Keeping it longer costs little and helps anyone with an old link.

Does a redirect change my analytics? #

It can. A rule that sends every old address to one fixed new address drops anything after the question mark, including UTM parameters. Then the visit loses its campaign and may look like direct traffic. Test a tagged link from end to end.

Sources #

Updated 24 November 2026 by URSY.com.

Cite this page: 301 vs 302 redirect: which to use. URSY. Updated 26 November 2026. https://ursy.com/wiki/301-vs-302-redirect/ · Section links

Tools for this

All 871 wiki entries, A to Z →