301 vs 302 redirect: which to use and how many hops Google follows

By SEOgrinder · Published · 9 min read

Short answer: In the 301 vs 302 decision, use a 301 (or its twin 308) when the old address is gone for good, and a 302 (or 307) only when the move is temporary and the old address should stay in search. Google treats a permanent redirect as a strong signal to process the target and a temporary one as a weak signal. It follows up to 10 hops by default, but you should send every old address to its final destination in one step.

301 vs 302: what is the difference?

A redirect is a server answer that says "not here, go there" and names the new address in the Location header. The status code tells the client why. In the HTTP standard (RFC 9110), 301 means the page has a new permanent address, and 302 means it is only temporarily somewhere else, so the client should keep using the original address. Google reads the same difference and acts on it:

CodeMeaningWhat Google does
301Moved permanentlyFollows it; strong signal that the target should be processed
308Permanent redirectSame as 301
302Found (temporary)Follows it; weak signal that the target should be processed
307Temporary redirectSame as 302

The table comes from Google's page on HTTP status codes (last updated 2026-02-04). What it means in search is on Google's redirects page (last updated 2026-04-14): permanent redirects show the new target in search results, temporary redirects show the source page. We read the Google pages linked here on 4 November 2026.

Why have 307 and 308 at all? Google treats them like 302 and 301 but notes that they are semantically different, so pick the code that fits. The difference is the request method: after a 301 or 302 a client may turn a POST into a GET, after a 307 or 308 it must keep the method (RFC 9110, section 15.4). For normal page views you will not notice; for forms and APIs that receive POST requests, use 308 or 307.

Which redirect should you use?

One question settles most cases. Google's redirects page says: "Use permanent redirects when you're sure that the redirect won't be reverted." If the old address never comes back, use a 301. If it will come back, use a 302.

SituationUseNote
A page got a new address (new slug, new folder)301 or 308The new target shows in search
Two pages were merged into one301 from each old address to the merged pageGoogle's site-move guide allows this for merged content
http to https, or www to non-www (or the reverse)301 or 308Google: pick one preferred address and redirect the others to it
A service is down for a while and visitors get an explanation page302 or 307The old address stays in search
The page is gone and nothing replaces itNo redirect: 404 or 410See how to remove a page from Google
Many old addresses to the home pageDon'tGoogle says this might be treated as a soft 404

The last row is from Google's site-move guide (last updated 2026-08-20), and our article on soft 404 errors shows how to find them. The guide itself is about moving a whole site to a new domain, which is a bigger job than this article covers.

What does the wrong choice cost? A 302 on a page that moved for good tells Google something untrue. A temporary redirect keeps the source page in the results, and "the target page might still be indexed if other canonicalization signals are present". That is a maybe, and we found no Google page that promises a long-lived 302 turns into a 301 later. So do not wait for it.

How many redirects does Google follow?

Google's status code page says: "By default, Google's crawlers follow up to 10 redirect hops." Googlebot generally follows 10 hops for web content, other Google products may use other limits, and whatever the redirecting address returns is ignored; the content of the final target is processed instead.

Ten is a ceiling, not a target. The site-move guide advises redirecting to the final destination directly, and if that is not possible, keeping a chain short, ideally no more than 3 and fewer than 5 hops. Its reason: "Chaining redirects adds latency for users, and not all user agents and browsers support long redirect chains." Google's page on crawl errors (last updated 2025-12-18) adds that long chains have a negative effect on crawling.

Chains grow in layers, not by design. A typical one has three hops before the page appears:

http://example.com/old-guide       301 -> https://example.com/old-guide
https://example.com/old-guide      301 -> https://www.example.com/old-guide
https://www.example.com/old-guide  301 -> https://www.example.com/new-guide
https://www.example.com/new-guide  200

The fix is one hop per old address: each spelling of the old address answers with one 301 that names the final address. The same goes for your own links: point internal links, canonical tags and sitemap entries at the final address. A redirect is for outside visitors and old bookmarks, not for your own navigation.

How to set up a 301 redirect

Use a server-side redirect. Google's redirects page lists it as the type most likely to be interpreted correctly. We ran the nginx and Node examples below on 4 November 2026 (nginx 1.24.0, Node 25.9.0) and read the answers with curl. The Apache lines are Google's own example, which we did not run.

nginx first. The location rule belongs in the server block of https://example.com. The two server blocks send every other spelling there in one hop, and $request_uri keeps path and query string:

# one page moved for good (use 302 for a temporary move)
location = /old-guide {
    return 301 https://example.com/new-guide;
}

# http:// and https://www. both go to https://example.com
server {
    listen 80;
    server_name example.com www.example.com;
    return 301 https://example.com$request_uri;
}

server {
    listen 443 ssl;
    server_name www.example.com;
    ssl_certificate     /etc/ssl/example.com.pem;
    ssl_certificate_key /etc/ssl/example.com.key;
    return 301 https://example.com$request_uri;
}

Node without packages. Replace 301 with 308 if POST requests must stay POST:

import http from 'node:http';

const moved = new Map([['/old-guide', '/new-guide']]); // old path -> new path

http.createServer((req, res) => {
  const { pathname, search } = new URL(req.url, 'http://localhost');
  const target = moved.get(pathname);
  if (target) {
    res.writeHead(301, { location: `https://example.com${target}${search}` });
    return res.end();
  }
  res.writeHead(200, { 'content-type': 'text/plain' });
  res.end('ok');
}).listen(3000);

Apache, from Google's page (in the server configuration or an .htaccess file):

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

If you cannot touch the server, check your platform first: Google names Blogger and Shopify as examples that may have redirect tools built in. Google also reads a meta refresh (0 seconds counts as permanent, a delay as temporary) and JavaScript redirects, but only as a fallback. With JavaScript, Google "might never see it" if rendering fails.

How to check your redirects and what SEOgrinder finds

Two curl commands cover it. The first prints every hop with its status and target, the second gives the count and the final address. They use GET, not HEAD, because some servers answer HEAD differently:

curl -s -L -o /dev/null -D - http://example.com/old-guide | grep -i -E "^(HTTP|location)"
curl -s -L -o /dev/null -w "%{num_redirects} redirects, final: %{url_effective}\n" http://example.com/old-guide

Run them for every spelling people and links use: http and https, with and without www. The result you want is one 301 and then a 200.

SEOgrinder is our tool; we build it. The free scan at SEOgrinder looks at redirects in three places (names as in the English interface):

  • Tab "Technology & security", card "Redirects". It lists the hops of the address you scanned. If that address redirects more than once, the task "N redirects in a row" shows the hops and advises pointing the first URL straight at the final destination.
  • Same tab, card "Domain consistency". It expects http and https, with and without www, to end at one address. The task "N competing versions of the site" appears if they do not. "Domain redirect is only temporary" appears if a spelling redirects with 302, 303 or 307.
  • Tab "Page on Google". The task "N internal links go through a detour" lists internal links whose target redirects or names another page as canonical (up to 60 internal links of the scanned page).

Two limits. The chain check covers the scanned address and the spellings of your domain, not every old address of your site, so test old addresses with curl. And SEOgrinder cannot judge whether a target is a fitting successor, or how Google treated a redirect. "Hand over to AI" turns a task into a briefing for a coding agent, and "Check again" runs a fresh scan after your change.

Common mistakes

  • A 302 for a permanent move. The old address may stay in results. Use 301 or 308.
  • A 301 for something temporary. A shop closed for a week needs a 302.
  • Stacked rules that build chains. http, then https, then www, then the new page: three hops. Name the final address in every rule.
  • Sending everything to the home page. Redirect to an equivalent page, or answer 404 or 410.
  • Own links that still use the old address. Update internal links, canonicals and the sitemap.
  • Blocking the old address in robots.txt. Google then cannot fetch it and never sees the redirect. In Google's 2011 post Do 404s hurt my site?, the crawler "has to be able to crawl that URL" to see its answer.
  • Removing the redirect too early. For site moves Google says: "Keep the redirects for as long as possible, generally at least 1 year." Applying that to a single page is our reading.

FAQ

Does a 301 redirect hurt SEO?

Google's site-move guide says: "301 and other permanent redirects don't cause a loss in PageRank." The sentence stands in the guide for site moves, so applying it to a single page is our reading. What Google does warn about are long chains, redirects to unrelated pages (soft 404) and, during a move, ranking fluctuation while it recrawls.

Is 308 better than 301?

For Google they are equivalent. 308 also keeps the request method, which matters for forms and APIs. For ordinary pages, a 301 is fine.

How long until Google shows the new address?

For a single page, Google names no time that we found. For site moves, it says that for medium-sized websites "it can take a few weeks or more" until the new URLs gradually replace the old ones in results. Promise no date.

Your next step

Run the first curl command against your old addresses and against each spelling of your domain. If any request needs more than one hop, point the first address straight at the final one. Then scan your site with SEOgrinder, open the "Technology & security" tab, look at "Redirects" and "Domain consistency", and press "Check again" after your change. For more of the technical basics, see our SEO audit checklist.

More from the blog