The difference between a 301 and a 302 redirect is permanence. A 301 redirect tells browsers and search engines that a URL has moved permanently, so the new URL replaces the old one in search results. A 302 redirect signals a temporary move, so the original URL stays indexed.
Choosing the wrong status code sends search engines a mixed signal about which URL to rank. This guide explains what each redirect does, how Google treats them, and which one fits 10 common situations.
What Is a 301 Redirect?
A 301 redirect is an HTTP status code (301 Moved Permanently) that sends users and search engines from an old URL to a new URL for good. Google treats a 301 as a strong signal that the new URL is canonical, so the new URL replaces the old one in search results.
The server returns the 301 status with a Location header that holds the new address. The browser then requests that new address automatically. The visitor sees only the final page.
A 301 redirect has 4 defining attributes:
- Status text: “Moved Permanently,” defined in RFC 9110.
- Search result shown: the redirect target (new URL), per Google Search Central.
- Browser caching: browsers cache a 301 by default, so repeat visitors skip the old URL entirely.
- Typical lifespan: permanent. Google recommends permanent redirects only when the redirect will not be reverted.
Common 301 redirect examples include moving http:// pages to https://, changing example.com/blog/seo-tips to example.com/seo-tips, and merging two domains after an acquisition.
What Is a 302 Redirect?
A 302 redirect is an HTTP status code (302 Found) that sends visitors to a different URL for a limited time while the original URL keeps its place in search results. Google treats a 302 as a weak canonical signal, so the source page usually stays indexed.
The 302 response also carries a Location header. Browsers follow it the same way they follow a 301. The difference lies in caching and indexing: browsers do not cache a 302 by default, and search engines keep checking the original URL.
A 302 redirect has 4 defining attributes:
- Status text: “Found” in HTTP/1.1. HTTP/1.0 called it “Moved Temporarily.”
- Search result shown: the redirect source (original URL), per Google Search Central.
- Request method: browsers often switch a POST request to GET after a 302. MDN recommends a 307 when the method must stay the same.
- Typical lifespan: days to a few weeks, tied to a known end date.
Common 302 redirect examples include sending an out-of-stock product page to a category page, routing users to a maintenance page during a server upgrade, and sending a share of traffic to a test page during an A/B test.
What Is the Difference Between a 301 and a 302 Redirect?
The 301 vs. 302 difference comes down to which URL Google indexes: a 301 makes the new URL canonical, while a 302 keeps the old URL in search results. Both redirects send the visitor to the same destination, and both pass PageRank. Caching and canonical signals differ.
| Attribute | 301 Redirect | 302 Redirect |
|---|---|---|
| Status text | Moved Permanently | Found |
| Meaning | URL moved for good | URL moved for now |
| URL shown in Google | New URL (target) | Old URL (source) |
| Canonical signal | Strong | Weak |
| PageRank passed | Yes | Yes |
| Browser caching | Cached by default | Not cached by default |
| Best for | Migrations, HTTPS, merged pages | Maintenance, A/B tests, promotions |
| Method-preserving version | 308 | 307 |
How Do 301 and 302 Redirects Affect SEO?
301 redirect SEO value comes from consolidation: a 301 moves rankings, backlinks, and indexing to the new URL, while a 302 keeps them attached to the old URL. Neither redirect loses PageRank. The SEO risk comes from picking the code that signals the wrong canonical.
Do 301 and 302 Redirects Pass PageRank?
Both redirect types pass full PageRank. Google’s Gary Illyes confirmed on July 26, 2016, that 30x redirects no longer lose PageRank, as Search Engine Land reported. The older belief that a 301 costs 15% of link value dates from before that change.
Which URL Does Google Index After a Redirect?
Google indexes the redirect target after a 301 and the redirect source after a 302. Google’s HTTP status code guide calls a 301 a strong canonical signal and a 302 a weak one. Other signals, such as internal links and rel=”canonical” tags, still influence the final choice.
Google stores the other URL as an alternate name of the canonical. After a domain move, old URLs appear in results occasionally until users adopt the new domain.
What Happens When a 302 Stays in Place for Months?
A long-running 302 sends a mixed signal. Google keeps the old URL indexed while users land on the new one, so the new page builds rankings slowly. Google sometimes reinterprets a long-lived 302 as a 301, but that heuristic is not guaranteed. Check the redirected URL in the Search Console URL Inspection tool to see which URL Google treats as canonical.
When Should You Use a 301 vs. a 302 Redirect?
Use a 301 redirect when the old URL will never return and a 302 redirect when the original URL comes back on a known date. Google advises permanent redirects only when you are sure the redirect will not be reverted. When the move is permanent but you are unsure, a 301 is the safer default.
| Situation | Redirect | Reason |
|---|---|---|
| Domain change (oldbrand.com → newbrand.com) | 301 | New domain must replace old URLs in results |
| HTTP to HTTPS migration | 301 | HTTPS version is the permanent canonical |
| www to non-www (or the reverse) | 301 | One preferred hostname consolidates signals |
| URL slug change (/blog/seo-tips-2024 → /seo-tips) | 301 | Old slug is retired |
| Two articles merged into one | 301 | Combined page inherits backlinks |
| Deleted product with a direct replacement | 301 | Replacement page serves the same intent |
| Product temporarily out of stock | 302 | Original page returns when stock arrives |
| Site maintenance or server upgrade | 302 | Original pages resume after the work |
| A/B test of a landing page | 302 | Original URL stays canonical during the test |
| Seasonal promotion (/sale → /diwali-sale) | 302 | Campaign page expires after the season |
Google’s A/B testing guidance specifically recommends a 302 for test variants. A 301 there would make the test page canonical.
How Do You Decide Between a 301 and a 302 in 3 Questions?
The choice between a 301 and a 302 comes down to whether the old URL will ever serve its original content again. Answer these 3 questions in order and stop at the first “yes”:
- Will the original URL return on a known date? Use a 302. Examples: a sale page, maintenance, and an out-of-stock product.
- Is the redirect part of a test? Use a 302, so the original URL stays canonical during the A/B test.
- Is the old URL retired for good? Use a 301. Examples: a new domain, HTTPS, a changed slug, and merged articles.
When none of the answers is clear, pick the 301 for any move you do not plan to undo within a few months. A 302 that stays live with no end date is the costlier mistake, because Google keeps ranking the old URL.

How Do 307, 308, and Meta Refresh Redirects Compare?
Google groups every redirect method as either permanent (like a 301) or temporary (like a 302). A 308 behaves like a 301, a 307 behaves like a 302, and meta refresh depends on its delay. Server-side status codes are the most reliable option for SEO.
| Method | Type in Google | Key detail |
|---|---|---|
| 308 Permanent Redirect | Permanent | Keeps the request method (POST stays POST) |
| 307 Temporary Redirect | Temporary | Keeps the request method; browsers also use it internally for HSTS upgrades |
| 303 See Other | Temporary | Forces a GET request, used after form submissions |
| Meta refresh, 0 seconds | Permanent | Runs in the HTML <head> when server access is unavailable |
| Meta refresh, 1+ seconds | Temporary | Delayed redirect, weaker for users and SEO |
JavaScript window.location |
Permanent | Google sees it only when rendering succeeds |
Source: Redirects and Google Search. For a standard page move, a 301 remains the most widely supported choice. A 308 matters mainly for APIs and form endpoints that must preserve POST data.
How Do You Set Up a 301 or 302 Redirect?
A 301 or 302 redirect is set up on the server, through the .htaccess file on Apache, the server block on Nginx, or a header in PHP. The only change between the two is the status code. The examples below follow Google’s redirect documentation.
Apache (.htaccess)
# Permanent (301)
Redirect permanent “/old-page” “https://example.com/new-page”
# Temporary (302)
Redirect temp “/sale” “https://example.com/diwali-sale”
Nginx
location = /old-page {
return 301 https://example.com/new-page;
}
location = /sale {
return 302 https://example.com/diwali-sale;
}
PHP
header(‘HTTP/1.1 301 Moved Permanently’);
header(‘Location: https://example.com/new-page’);
exit();
Replace the first line with header(‘HTTP/1.1 302 Found’); for a temporary redirect. Send the headers before any page output.
WordPress
WordPress users add redirects through a plugin instead of editing server files. Common options include Redirection, Rank Math (Redirections module), and Yoast SEO Premium (Redirect manager). Each plugin lets you pick 301 or 302 from a dropdown for every rule.
How to Verify the Redirect
- Run curl -I https://example.com/old-page in a terminal.
- Confirm the first line shows 301 Moved Permanently or 302 Found.
- Confirm the Location header shows the intended target.
- Inspect the old URL in Google Search Console after Google recrawls it.
How Do You Fix a 302 Redirect That Should Be a 301?
To fix a 302 that should be a 301, find the rule that sends the 302, change its status code to 301, and confirm the change with curl. Google applies the new canonical signal the next time it recrawls the old URL.
- Find the wrong redirects. Run curl -I on the old URL, or crawl the site with Screaming Frog SEO Spider and filter for 302 responses.
- Locate the rule. Check .<htaccess>, the Nginx config, the redirect plugin, Cloudflare Redirect Rules, and application code. A CDN rule can override the server rule.
- Change the code. Use the fix for your platform from the table below.
- Retest. curl -I should now show 301 Moved Permanently.
- Ask Google to recrawl. Inspect the old URL in Search Console and request indexing for the new URL.
| Platform | Sends a 302 when | Change to |
|---|---|---|
| Apache | Redirect /old /new or [R] flag |
Redirect 301 /old /new or [R=301,L] |
| Nginx | return 302 or rewrite … redirect |
return 301 or rewrite … permanent |
| PHP | header('Location: …') alone |
header('Location: …', true, 301) |
| WordPress plugin | Rule saved as 302 | Edit the rule and pick 301 |
| Cloudflare | Status code set to 302 | Edit the Redirect Rule, set 301, redeploy |

What Are the Most Common Redirect Mistakes?
The most common redirect mistake is using a 302 for a permanent move, which keeps the old URL indexed and delays the new page’s rankings. Chains, loops, and irrelevant targets cause the next-largest share of redirect problems.
- 302 for a permanent change. PHP’s plain Location header and Apache’s Redirect directives without a status default to 302. Check the status code after every migration.
- Redirect chains. URL A → B → C wastes crawl time. Googlebot follows up to 10 hops and reports a redirect error after that, per Google’s status code guide. Point every old URL straight to the final URL.
- Redirect loops. URL A → B → A never resolves. Browsers show an “ERR_TOO_MANY_REDIRECTS” error.
- Redirecting everything to the homepage. Google treats irrelevant redirects of deleted pages as soft 404s. Redirect to the closest matching page, or return a 404/410.
- Stale internal links. Internal links still pointing at old URLs force an extra hop. Update menus, sitemaps, and in-content links to the new URLs.
- Removing redirects too early. Gary Illyes has advised keeping 301 redirects for at least 1 year, as Search Engine Journal reports. Backlinks to the old URL stop counting once its redirect disappears.
What Does “Page With Redirect” Mean in Google Search Console?
“Page with redirect” in Search Console means the listed URL redirects to another page, so Google indexes the target instead of the listed URL. For a correct 301, this status is expected and needs no fix.
The status appears under Indexing → Pages → Why pages aren’t indexed. Check it in 3 cases:
- An important page appears in the list. The page redirects by mistake. Remove the redirect so the URL returns 200.
- The old URL still shows in search results weeks later. The redirect is probably a 302. Switch it to a 301 using the steps above.
- The redirect target is not indexed either. The target page has its own problem, such as a noindex tag, a 404, or another redirect in a chain.
Keep redirecting URLs out of the XML sitemap. A sitemap should list only final URLs that return 200.
FAQs About 301 vs. 302 Redirects
Is a 301 or 302 redirect better for SEO?
Neither is better in every case. A 301 is correct for permanent moves because it transfers indexing to the new URL. A 302 is correct for temporary moves because it protects the original URL’s position. Both pass PageRank.
Can I change a 302 redirect to a 301 later?
Yes. Changing the status code on the server switches the signal immediately. Google applies the new canonical after it recrawls the URL, and the timing depends on how often Googlebot crawls that page.
Can a 301 redirect be undone?
A 301 can be removed, but browsers that cached it keep redirecting returning visitors until their cache clears. Google also needs to recrawl the old URL. Use a 302 whenever reversal is likely.
How long should a 301 redirect stay in place?
Keep a 301 redirect for at least 1 year, and indefinitely for URLs with external backlinks. Removing it turns the old URL into a 404 and drops the value of links pointing to it.
Does a 302 redirect hurt SEO?
A 302 does not hurt SEO when the move is temporary. It hurts only when used for a permanent change, because Google keeps ranking the old URL instead of the new one.
How do I check whether a URL uses a 301 or 302?
Run curl -I <URL> or use a browser’s Network tab (DevTools) and read the status code. Crawlers such as Screaming Frog SEO Spider list the redirect type for every URL on a site.
