Summarize this article with AI
You've moved a page. Click the old link and, sure enough, the redirect does its job. So why does the old URL keep turning up in Google when the new one has barely appeared? Honestly, the 301 vs 302 redirect decision is the easy half. The other half is proving what code your server really sends, and what Google made of it. I've led two website redesigns myself, one with a CMS migration, so everything here is a check you can run during a real move.
First comes a decision rule you can settle with one question. After that, the server and CMS defaults that sneakily turn permanent moves into 302s, and Apache and nginx rules ready to paste. The last part is a workflow for checking it all, from response headers to the Google-selected canonical in Search Console, Crawl Stats, and clicks.
301 vs 302 redirect: quick answer and first check
Use a 301 redirect for a permanent move you're sure will not be reversed.1 Pick a 302 redirect for temporary routing, when the original URL is coming back. Haven't decided yet? Then it's temporary until you do.
Your first check is the old URL itself: its HTTP response and its Location header. Then use Search Console's indexed URL Inspection data to assess canonical selection.2 A working redirect and a replacement page that shows up in search are two different things to confirm.
| Decision | 301 redirect | 302 redirect |
|---|---|---|
| HTTP meaning | Moved Permanently | Found, commonly called Moved Temporarily |
| Use when | The old page has a permanent replacement | Users need another page temporarily |
| Google Search behavior | Uses the redirect as a signal that the target should be canonical | Does not use the redirect as a signal that the target should be canonical |
| Search result goal | Show the new target | Show the source page |
| First deployment check | Expected 301 and correct Location | Expected 302 and correct Location |
Key takeaways: The status should fit the change. Read what the server actually returns, and check the target on its own. Do not treat a source page's redirect status as proof that its replacement is indexed.3
When a 301 redirect is the right call
A 301 redirect is an HTTP status code meaning "Moved Permanently."1 It tells browsers and search engines that future references should use the replacement URL.4
Reach for a 301 in cases like these:
- You're migrating to a new domain5
- You're moving your site to HTTPS or consolidating www/non-www versions5
- You're permanently replacing a discontinued page with a close equivalent6
- You're changing URL paths or retiring older pages after consolidating their content5

For site moves, Google recommends keeping redirects as long as possible, generally at least one year.5 That's how long it can take Google to recrawl everything and credit the new pages with links that still point at the old ones. For users, Google suggests considering keeping them indefinitely.
Redirects still slow users down. Point internal links straight to the replacement, and ask the sites sending traffic through your highest-volume backlinks to update their links.5
When a 302 redirect makes sense
A 302 redirect means "Found," commonly read as "Moved Temporarily."4 Use it when another page is needed temporarily and the original URL should remain the search result.1
- You're running an A/B test and need traffic to temporarily land on a variant URL7
- A service is temporarily unavailable and visitors need a page explaining what is happening1
Google's advice for A/B tests is a 302, not a 301. Point the variant page's rel="canonical" to the original, and remove test URLs as soon as possible after the experiment ends.7
Same idea for a redesign, or a platform switch you'll only keep if the numbers hold up. Use a 302 during the test window.7 Commit, and that same day it becomes a 301. Give one named person ownership of that decision so the 302 doesn't linger past the test.
A seasonal promo page that's coming back later gets the same treatment. Keep a 302 up for the campaign, and pull the rule once the original returns.
When not to use a temporary redirect
Taking the whole site down for a day or two of urgent maintenance? Google's recommendation is an informational error page served with a 503 HTTP response status code. Leave robots.txt out of it, though: a 503 there blocks all crawling. Longer closures call for an indexable placeholder home page returning 200.
Avoid automatic redirects between language versions based on a visitor's perceived location or language. Google warns these can prevent users and search engines from reaching all versions. Googlebot's default IP addresses appear US-based, and its requests do not set Accept-Language.
301 or 302? Decide before browsers cache the move
Ask: Will the original URL serve this content again? Use a permanent redirect when the answer is no and you're sure the change will not be reversed.1 Answered yes, or still trying the rollout out? Keep it temporary.

The order matters. Pulling back a 301 later is a pain, partly because HTTP semantics make it cacheable by default, and Shopify's URL redirect help notes that a removed 301 can go on working in a visitor's browser until the cache runs out. That makes "we haven't decided yet" an argument for a 302 and against a 301.
Removed a rule and your browser still redirects? Pull fresh server headers before touching the mapping again. The server may already return the correct response while your browser uses its cached redirect.8
| Situation | Recommended action | What to validate |
|---|---|---|
| Committed domain or path move | 301 to the equivalent new page | Correct target, target canonical and updated internal links |
| A/B test with a separate variant URL | 302 during the experiment | Temporary code and variant canonical pointing to the original |
| Redesign still under evaluation | 302 while testing, 301 once you commit | Explicit restore-or-commit decision |
| Consolidating articles and retiring the old pages | 301 to the consolidated content | Target is a relevant replacement |
| Seasonal page you plan to restore | 302 while the campaign runs | Restore the original when the campaign ends |
| Whole-site downtime for one or two days | 503 informational error page | Status code on content pages; robots.txt remains accessible |
What 301 and 302 redirects mean for SEO
Google says 301 and other permanent redirects do not cause a loss in PageRank.5 The practical SEO distinction is canonical selection: permanent redirects signal that the target should be canonical. Temporary redirects do not provide that canonical signal, although the target might still be indexed through other canonicalization signals.1

Some articles still claim a 301 passes 90-99% of link equity and authority, or that the hop costs you 15% of the link juice. Google's own redirect and site-move docs don't give any percentage like that. Keep the PageRank point in proportion, though: it isn't a promise that rankings hold still, and Google tells you to expect temporary ranking fluctuations during a site move.5
Google tracks both the source and target; one becomes canonical and the other an alternate name. After a domain move, old URLs can still appear occasionally in search results even when the replacements are indexed.1 So an old listing, by itself, doesn't mean the redirect is broken.
A redirect sends visitors somewhere else. A canonical tag only states a preference, and both pages stay reachable. So retire duplicates with redirects, and reach for canonical tags when both versions have to stay available. Canonical preferences are hints, not rules Google must follow.2 Seeing "Alternate page with proper canonical tag" in Search Console? Our guide to that status explains when it's fine to leave alone.
Why 302s happen by accident: default codes by server and CMS
When you implement the redirect, start on the server. Server-level redirects are the right way to do this for SEO.1 According to Google, server-side redirects are the most likely to be read correctly.
Here's the catch. Leave out the code, and several common server and app features fall back to a 302. Your permanent redirect quietly ships as a temporary one, and you might not notice, because the browser ends up on the right page anyway. Their defaults look like this:
| Product or feature | Response when no code is specified | Explicit permanent setting |
|---|---|---|
| Apache Redirect directive | 302 | Redirect 301 /old-page /new-page |
Apache RewriteRule with [R] |
302 | Use [R=301] |
nginx return https://example.com/new-page; |
302 | Use return 301 /new-page; |
nginx rewrite ... redirect |
302 | Use the permanent flag for 301 |
PHP header('Location: ...') |
302 unless 201 or a 3xx code is already set | Set the chosen response code explicitly |
Express res.redirect(url) |
302 | Use res.redirect(301, url) |
WordPress wp_redirect() |
302 | Pass 301 as the status argument |
| Cloudflare Single Redirects | 301 by default | Confirm the rule's selected status |
On WordPress, the default depends on what created the redirect. When you change a post's slug, its core old-slug redirect sends a 301, but it skips hierarchical post types such as pages.9 Custom code that calls wp_redirect() without a status sends a 302.10 With the Redirection plugin, you choose the code for each redirect yourself (301, 302, 307, 308 or another), and the plugin adds redirects automatically when a post's URL changes.
Move or delete a page with Yoast's Redirect Manager installed and you get a 301 automatically, though it can do temporary codes as well. It is included in Yoast SEO Premium, Yoast SEO AI+, and Yoast WooCommerce SEO.11 Shopify's URL redirects work only from broken URLs: a rule won't fire while the old URL still loads a valid page.8
Copyable Apache and nginx rules
In an Apache .htaccess file, add the status to the Redirect directive.1 Use the rule that matches the change:
# Permanent move
Redirect 301 /old-page /new-page
# Temporary move
Redirect 302 /old-page /new-page
For nginx, use an exact location match for this specific path.1 Deploy the matching block:
# Permanent move
location = /old-page {
return 301 /new-page;
}
# Temporary move
location = /old-page {
return 302 /new-page;
}
If server-side redirects are unavailable, Google interprets instant meta refresh redirects as permanent and delayed meta refresh redirects as temporary.1 JavaScript redirects are the last resort, for when neither server-side nor meta refresh is possible. Google may miss a JavaScript redirect if rendering fails.
301 vs 302, 307, and 308: where the request method comes in
Google treats 308 like 301 and 307 like 302 for search processing.1 The difference between these HTTP status codes is request-method preservation: 307 and 308 preserve the method, while 301 and 302 allow a client to change POST to GET.4
| HTTP status code | Duration | Request method | Google treatment |
|---|---|---|---|
| 301 | Permanent | Client may change POST to GET | Permanent redirect |
| 302 | Temporary | Client may change POST to GET | Temporary redirect |
| 307 | Temporary | Preserved | Equivalent to 302 |
| 308 | Permanent | Preserved | Equivalent to 301 |
For a form submission or API request that must stay POST, choose 307 for a temporary move or 308 for a permanent move.4 Google handles each pair identically. It still wants the semantically correct code, though, so other clients and search engines get the right signal. Next.js's redirects feature uses 308 with permanent: true and 307 with permanent: false, so those responses are not automatically misconfigurations.12
How to confirm your redirect worked in Search Console
Collect separate evidence for deployment and indexing. Reaching the replacement in a browser confirms that the route works; URL Inspection's indexed result shows the selected canonical. Start with server headers before interpreting a reporting change.
Check the response code and the Location header
Point these commands at the old URL, swapping in your own host and path. They inspect headers without using Search Console:
# Initial response headers, using HEAD
curl -I https://example.com/old-page
# Headers for a GET request, as in Google's status-check example
curl -I -X GET https://example.com/old-page
# Follow the redirects and show headers from the requested pages
curl -IL https://example.com/old-page
What matters is the first status code and the Location header; follow each hop until you land on the final page. Compare them with the mapping recorded in your redirect plan. Review representative rules before a site-wide rollout.
Do the same for every host and protocol variant:
curl -I http://example.com/old-page
curl -I https://example.com/old-page
curl -I http://www.example.com/old-page
curl -I https://www.example.com/old-page

Inspect the indexed source and target separately
In Google Search Console, inspect the old URL's indexed result. Look at the "Google-selected canonical" field and the current indexed status.2 Those results describe the tested URL in the index, not the replacement page.3
Inspect the target separately, or use INSPECT in the source result's Page indexing > Indexing section to inspect its canonical.3 URL Inspection reports the most recently indexed version, with information derived from the last crawl. The canonical field can also be a few hours behind the index value.2
Test Live URL is not a redirect checker. Google says the live test cannot predict whether the tested version will be considered canonical; only the indexed result shows that.2 Use response headers for the redirect and the indexed result for the canonical.
Interpret Page with redirect without assuming success
Search Console's "Page with redirect" status describes a non-canonical URL that redirects elsewhere and will not be indexed.3 Its target may or may not be indexed. It also works the other way: if Google still treats a redirecting URL as canonical, that URL can be indexed and won't show up in this row at all.
Seeing "Crawled - currently not indexed" on the replacement? That's a separate problem, and our guide to that status walks through it. Keep that investigation separate from proving the old page returns the right response.
Copy this worksheet into your audit notes:
Old URL:
Replacement URL:
Permanent or temporary decision:
Expected code:
Observed initial code and Location:
Final page reached:
HTTP/HTTPS and www/non-www results:
Source status in URL Inspection and last crawl:
Target status in URL Inspection and last crawl:
Google-selected canonical:
Remaining conflicting links, canonical tags or sitemap entries:
Owner and next review:
Check your redirect mix in Crawl Stats
URL Inspection checks one URL at a time, and that's it. To see your redirect mix across a site, open Property settings > Crawl stats in Search Console and look at the By response table.13 Click any response type to see Google's example requests, then compare them with your redirect map.
Google's note on the 302 row is blunt. It says: "If this page is permanently moved, change this to 301."13
| Crawl Stats response bucket | What it includes | Action |
|---|---|---|
| Moved permanently (301) | HTTP 301 and 308 | Compare examples with your permanent-move map |
| Moved temporarily (302) | HTTP 302 and 307 | If the page is permanently moved, change the response to 301 |
| Moved (other) | Meta refresh | Review whether that redirect method matches your plan |
Crawl Stats counts the actual URLs requested, rather than assigning requests to canonicals.13 Each request in a redirect chain counts separately. The report covers the current domain's pages, so do not read its counts as a full cross-domain move inventory.
Troubleshoot redirect errors and conflicting canonicals
Use the observed response and selected canonical to decide what to fix. Avoid diagnosing a code error from an old search listing or a click chart alone. Review the relevant row below, then retest the specific page.
| What you see | What it means or what to investigate | Next action |
|---|---|---|
| Redirect error in Page indexing | A chain that is too long, a loop, excessive URL length, or a bad or empty URL in the chain | Inspect the hops and repair the failing path |
| Old URL still appears after a domain move | It can be an alternate name for an indexed new URL | Inspect the canonical and verify the live response |
| One variant still serves the old content | The variants behave differently | Add or repair the missing host/protocol rule |
| Duplicate, Google chose different canonical than user | The page declares a canonical, but another URL was selected for the index | Inspect the chosen URL; review redirects, canonical tags, internal links and sitemaps |
| Old and new pages both show Performance data | The chart alone does not identify the redirect fault | Compare canonicals in URL Inspection and last-crawl information before changing rules |
| Unrelated old pages redirect to the homepage | Google may treat irrelevant redirects as soft 404s | Map to relevant replacements rather than a generic target |
Point redirects directly to the final page when possible. Googlebot will follow a chain of up to 10 hops. Don't treat that number as a target, though. Google's site-move advice is ideally no more than three redirects and fewer than five when a direct route is not possible.5
Long chains make users wait and can drag on crawling too. Redirect loops are a listed cause of "Redirect error"; fix the route rather than waiting for a report to clear.3 For irrelevant replacements, the soft 404 guide explains that separate issue.
Monitor the move until Google switches
Google processes site moves per URL as it revisits the old and new sites. Its guidance says medium-sized sites can take a few weeks or more to start showing new URLs, with larger sites taking longer.5 URL count and server speed affect how fast that happens.
After permanent redirects go live, update internal links, give new pages self-referencing canonical tags, and submit a sitemap of new URLs.5 For migration monitoring, Google also describes submitting old-URL and new-URL sitemaps. The old sitemap's indexed count should fall toward zero as the new sitemap's count rises; redirect warnings in the old sitemap are normal.
For a domain or subdomain move, submit a Change of Address for the old site. Moving to a new domain? Submit it for every verified variant of the old one, www and non-www alike. HTTP-to-HTTPS moves, www/non-www consolidation and path changes don't use this tool. For this tool, Google says keep redirects at least 180 days, or longer while search traffic still reaches the old URLs. The general site-move advice is still at least a year.

Search Console's Performance report assigns most data to the canonical URL rather than a duplicate. A click on a duplicate search result counts toward the canonical, and the page dimension groups data by the final linked URL after redirects.14 Clicks shifting from old URL to new one tell you something, but pair them with the Google-selected canonical in URL Inspection. They don't prove the server sends a 301.
Check in at two, six, and 12 weeks. Those are review points I'd suggest, not deadlines Google works to. At each review, retest the rules, inspect representative canonicals, and compare sitemap counts and Performance data.
On a move that touches lots of pages, SEO Heatmap gives you Search Console clicks for every page and site section, by month or by week. You'll see which sections got their old traffic back and which are still behind. Start your URL Inspection checks in the ones lagging.
Frequently asked questions
Does a 302 redirect hurt SEO?
No. It's the correct code whenever routing is temporary. For an A/B test, Google even prefers a 302 to a 301. What it won't do is make the target canonical, so I'd change it to a 301 as soon as the move is permanent.
Is a 301 permanent, and do I have to keep it forever?
Yes, a 301 is by definition permanent. Keeping the rule forever is a separate call. For site moves, Google recommends keeping redirects as long as possible, generally at least one year. And if people still arrive through old links, there's a case for never removing them.
What are 307 and 308 redirects, and should I pick 301 or 308?
307 is the temporary one, and 308 is the permanent one. Neither lets the request method change. Google Search treats them like a 302 and a 301, respectively. When a request must stay POST, as with a form submission, go with 308 rather than 301, because a 301 can change POST to GET.
How should I handle switching a 302 to a 301?
Switch only once you're sure the move is permanent, then check the first response code and the Location header. Then update internal links, the target page's canonical tag and the sitemap. To see which URL Google treats as canonical, inspect each one on its own in Search Console's indexed data.
Why is my permanent redirect returning a 302 instead?
The deployed feature may default to 302 when you omit a status code. The Apache Redirect directive, Express res.redirect(), and WordPress wp_redirect() have that default. Specify the permanent code explicitly, then retest headers across host and protocol variants.
Is it normal for the old URL to remain visible in search?
Yes. Even with the replacements indexed, old URLs sometimes pop up after a domain move. That listing alone does not prove the redirect failed. Verify the response and inspect the Google-selected canonical in indexed URL Inspection data.
Why isn't the replacement indexed if the old page says "Page with redirect"?
"Page with redirect" does not confirm that the replacement is indexed. It describes a non-canonical source that redirects elsewhere. Inspect the target separately and investigate its reported indexing status.
Can a long redirect chain cause Redirect error?
Yes, an overly long chain or redirect loop can cause "Redirect error." Googlebot can follow up to 10 hops, but point directly to the final page when possible. If that is impossible, Google's advice is ideally no more than three redirects and fewer than five.
Watching a redirect handover? SEO Heatmap shows the old and new URLs' weekly clicks, so you can see when the move reaches your traffic. It's free for one Search Console property.
Sources (14)
SEO Heatmap Knowledge relies on primary sources: Google's documentation, web standards, peer-reviewed research, and vendors' own pages for their pricing and features. Our editorial standards
- Google Search Central. “Redirects and Google Search.”
- Google Search Console Help. “URL Inspection tool.”
- Google Search Console Help. “Page indexing report.”
- IETF. “HTTP Semantics.”
- Google Search Central. “Site Moves and Migrations.”
- Google Search Central. “Troubleshoot Google Search Crawling Errors.”
- Google Search Central. “A/B Testing Best Practices for Search.”
- Shopify. “Creating and managing URL redirects.”
- WordPress. “wp_old_slug_redirect().”
- WordPress. “wp_redirect().”
- Yoast. “Redirect Manager.”
- Vercel. “next.config.js: redirects.”
- Google Search Console Help. “Crawl Stats report.”
- Google Search Console Help. “Performance report (Search results): Dimensions and data groupings.”