Home / Knowledge Base / Tools and integrations / 301 vs 302 Redirect: Which One to Use (and When It Matters for SEO)

301 vs 302 Redirect: Which One to Use (and When It Matters for SEO)

Tools and integrations 7 min read Updated 13.10.2026
Permanent vs temporary redirects, where 303, 307 and 308 fit in, meta refresh and JavaScript redirects, how Google treats each, chains and loops, and a migration checklist.

A redirect sends visitors and search engines from one URL to another. For a person, the result looks the same whichever type you use. For search engines, the type is a signal: "this page has moved for good" or "this page is temporarily somewhere else". Choosing the wrong one rarely breaks a site overnight, but it can slow down how quickly Google moves rankings to the new address and which URL it shows in results.

301 vs 302 in one sentence each

  • 301 Moved Permanently — the old URL is gone for good; use the new one from now on. Search engines treat it as a strong signal that the target should be the indexed, canonical URL.
  • 302 Found (temporary) — the content is temporarily at another address; the original URL remains the main one. Search engines tend to keep the original URL in the index.

If you are changing a URL and do not plan to change it back, use 301. If you will switch back (maintenance page, short promo, A/B test, out-of-stock product temporarily pointing elsewhere), use 302.

All redirect types at a glance

TypeMeaningRequest method on redirectTypical use
301PermanentBrowsers may change POST to GETURL changes, domain moves, HTTP→HTTPS
302TemporaryBrowsers may change POST to GETTemporary moves, geo or language routing, tests
303See otherAlways GETAfter a form submission ("post/redirect/get")
307TemporaryMethod and body keptTemporary redirects of APIs and forms
308PermanentMethod and body keptPermanent moves where POST must stay POST
Meta refreshHTML tag, delay 0 or more—When you cannot configure the server
JavaScriptwindow.location in a script—Single-page apps, last resort

For SEO, Google’s documentation groups 301 and 308 as permanent and 302, 303 and 307 as temporary. The difference between 301 and 308 (or 302 and 307) matters to browsers and APIs, not to rankings.

About 307 in your browser
If a site uses HSTS, your browser may show an "internal" 307 when you type http:// — the browser upgrades to HTTPS itself before any request is sent. That 307 is not what the server returns; check the real response with a server-side tool.

How Google treats redirects

Google describes server-side permanent redirects as a strong signal for choosing the canonical URL, and temporary redirects as a weak one. In practice:

  • With a 301/308, Google usually replaces the old URL with the new one in results and consolidates signals such as links on the target.
  • With a 302/307, Google usually keeps showing the old URL for a while, because you said the move is temporary.
  • If a 302 stays in place for a long time and the target looks like a permanent replacement, Google may eventually treat it as permanent. It is not a good idea to rely on that: if you mean permanent, say so with a 301.
  • Meta refresh with zero delay is generally understood as a permanent redirect; one with a delay is treated as temporary. JavaScript redirects only work after the page is rendered, which happens later and is less reliable. Use both only when server redirects are impossible.

The redirect is just one canonicalization signal among several, along with the rel=canonical tag, internal links and sitemaps. Keep them consistent; see canonical address for how they work together.

When the choice actually matters

  • Site migration or domain change — always 301 (or 308). A 302 here can keep old URLs in results longer and delay the transfer of signals.
  • HTTP → HTTPS and www ↔ non-www — 301, once per URL, straight to the final version. These are permanent decisions.
  • Deleted product or article with a close replacement — 301 to the replacement. If there is no real equivalent, a 404 or 410 is more honest than a redirect to the homepage, which Google may treat as a soft 404 anyway.
  • Seasonal or out-of-stock pages that will return — 302, or better, keep the page live with a notice.
  • Language or country detection — temporary redirects are common, but do not force-redirect search engine crawlers away from your language versions; link versions with hreflang instead.

Chains and loops

A chain is a redirect that leads to another redirect: http://example.com/page → https://example.com/page → https://www.example.com/page → https://www.example.com/new-page. Each hop adds a round trip for the visitor. Google follows a limited number of hops (its documentation mentions up to 10) and may stop before the end of a long chain. Fix chains by pointing every old URL directly at the final address and updating internal links to it.

A loop is a chain that returns to its own start — A → B → A. Browsers stop with "too many redirects" and the page is unreachable for everyone, including crawlers. Loops typically appear when two rules contradict each other, for example the CDN forces HTTP while the server forces HTTPS.

How to set up a 301

Configure redirects on the server or in your CMS, not in page code. The two most common web servers:

# Apache (.htaccess)
Redirect 301 /old-page/ https://example.com/new-page/

# Nginx
location = /old-page/ { return 301 https://example.com/new-page/; }

In WordPress and most other CMSs, a redirect plugin or the built-in redirect manager does the same without editing server files. If the site is behind a CDN, its redirect rules run before the request reaches your server — handy, but remember they exist when you debug. For a whole-domain move, redirect each path to the same path on the new domain rather than everything to the homepage. Whatever the method, check the result from outside: a typo in a rule can quietly return 302, create a loop or redirect pages you did not intend to touch.

How to check a redirect

Do not trust the browser address bar: browsers cache 301 redirects aggressively, so after you change a rule you may keep seeing the old behaviour. Check server-side instead:

  • The redirect checker follows the whole chain and shows each hop with its status code, so you can spot 302s where you expected 301s, extra hops and loops.
  • The HTTP status checker shows the exact code of a single URL and its final destination.
  • From a terminal: curl -I https://example.com/old-page shows the status and the Location header.

A step-by-step guide to reading chains and finding their sources is in how to check redirects and redirect chains.

Migration checklist

  1. Export a full list of old URLs: from a crawl, the sitemap, analytics and Search Console (pages with traffic and backlinks first).
  2. Map each old URL to its closest new equivalent, one to one. Avoid sending everything to the homepage.
  3. Implement 301 redirects on the server, not with meta refresh or JavaScript.
  4. Combine protocol, host and path changes into a single hop where possible.
  5. Update internal links, canonical tags, hreflang and the sitemap to the new URLs, so that redirects serve only external links and bookmarks.
  6. Test a sample of old URLs (including ones with parameters and trailing slashes) with the redirect checker before and right after launch.
  7. For a domain change, use the Change of Address tool in Google Search Console and keep the redirects in place for a long time — Google recommends at least a year.
  8. Watch Search Console for 404s and redirect errors over the following weeks.

FAQ

Should I use 301 or 302?
Use 301 when the move is permanent and you will not switch back: URL changes, domain moves, HTTP to HTTPS. Use 302 for genuinely temporary situations such as maintenance pages, short promotions or tests.
Does a 301 redirect lose rankings?
Google states that permanent redirects pass signals to the target and do not by themselves cause a loss of PageRank. Rankings can still fluctuate during a migration while Google recrawls and reprocesses the site.
What is the difference between 301 and 308?
Both are permanent. With 308 the browser must repeat the request with the same method and body, so POST stays POST; with 301 browsers may switch to GET. For SEO Google treats them the same.
What happens if I leave a 302 in place for a long time?
Google may eventually treat it as permanent if the target looks like a lasting replacement, but this is not guaranteed. If the move is permanent, change it to a 301.
How many redirects in a chain are too many?
Aim for a single hop. Google follows a limited number of redirects and every hop slows visitors down, so point old URLs directly at the final address.
Was this article helpful?
Try it on your project Everything described in the article is available in the dashboard — the registration bonus is already in your balance.
Open dashboard