
When Should a 302 Redirect Be Used?
Learn when to use 302 redirects for temporary URL changes. Discover best practices, SEO implications, and how 302 redirects differ from 301 redirects in our com...
A 302 redirect is an HTTP response status code indicating that a requested resource has been moved temporarily to the URL specified in the Location header.
MDN’s 302 reference documents the temporary redirect and its request-method behavior. A 307 is the temporary alternative when the original request method must be preserved.
On this page
A 302 redirect is an HTTP response status code indicating that a requested resource has been moved temporarily to the URL specified in the Location header. The HTTP/1.1 specification defines it as 302 Found, while earlier versions of HTTP labeled it Moved Temporarily.
When a browser or search engine crawler requests a URL that returns a 302 status code, the server responds:
HTTP/1.1 302 Found
Location: https://example.com/temporary-page
This is fundamentally different from a 301 redirect, which signals that content has been permanently moved and instructs search engines to transfer link equity to the new destination. Confusing the two remains one of the most common technical SEO mistakes, and it can take months to recover from the consequences.
Understanding the technical flow behind a 302 redirect helps explain why the redirect type matters for both user experience and search engine behavior.
Step 1: The request. A user clicks a link or types a URL — say, https://example.com/summer-sale. Their browser sends an HTTP GET request to the server.
Step 2: The server response. Instead of returning the requested page with a 200 OK status, the server responds with 302 Found and includes a Location header pointing to https://example.com/special-offer. The server is effectively saying: “That page is somewhere else for now.”
Step 3: The browser follows. The browser automatically issues a second request to the destination URL. The user sees the content from the new URL, often without noticing the redirect occurred.
Choosing the wrong redirect type is a mistake that can cost rankings, traffic, and revenue. The table below summarizes the four most commonly confused redirect status codes and when each one applies.
| Status | Meaning | Method behavior |
|---|---|---|
| 301 | Permanent move | A browser may change POST to GET |
| 302 | Temporary move | A browser may change POST to GET |
| 307 | Temporary move | Preserves the request method |
| 308 | Permanent move | Preserves the request method |
Similarly, using a 301 for a temporary change is equally dangerous. Once Google processes a 301, it may remove the old URL from its index entirely. When the temporary change ends and you remove the redirect, the original URL has lost its rankings — and rebuilding them can take months.
A 302 redirect is the correct choice when the change is genuinely temporary and the original URL is expected to return. Here are the practical scenarios where 302s shine.
When running A/B tests, you may want to send a portion of users to an alternative version of a page while keeping the original URL active and indexed. A 302 redirect routes test traffic to the variant without signaling to Google that the original page has been permanently replaced. Once the test concludes, you simply remove the redirect.
When a page needs to be taken offline temporarily — for updates, redesign, or backend maintenance — a 302 redirect sends users to a maintenance notice while preserving the original URL’s indexing. This is far preferable to returning a 503 (Service Unavailable) status, which can cause search engines to de-index the page if it persists.
If a product is temporarily unavailable but will be restocked, a 302 redirect from the product page to a related category or waitlist page keeps the original URL alive in search results. For affiliate marketers, this is especially relevant: removing a product page entirely can break affiliate links and tracking codes, cutting off publisher commissions even after the product returns.
Just as important as knowing when to use a 302 is knowing when to avoid it. Misapplied temporary redirects cause real SEO damage.
If you have permanently moved content — a rebrand, a domain migration, or a site restructuring — use a 301 redirect, not a 302. A 302 tells Google to keep the old URL indexed, which means your new URL may never rank.
When merging two blog posts into one definitive guide, a 301 redirect is the only correct choice. A 302 would leave the old URLs in Google’s index competing with the new merged page.
Moving a site from HTTP to HTTPS is a permanent change. Use 301 redirects. Using 302s for an HTTPS migration is a well-documented mistake: the old HTTP URLs remain indexed, splitting traffic and link equity between two versions of the same page.
Google has stated that it may eventually treat a long-standing 302 as a 301. If a 302 redirect has been in place for more than six months, Google may begin passing link equity to the destination anyway. At that point, you have effectively lost control of the signal. If you need a redirect to remain active indefinitely, use a 301 from the start.
A practical rule: if you cannot name the date when you will remove the redirect, use a 301.
A temporary redirect normally leaves the source URL as the intended search-result URL. Other canonicalization signals can still affect which URL Google indexes. A permanent redirect is a stronger signal that the destination should become canonical. Neither status code guarantees an unchanged ranking.
For affiliate tracking, test that the click is recorded, required identifiers reach the destination and a subsequent conversion receives the intended attribution. A redirect alone does not guarantee a commission.
The SEO implications of 302 redirects break down into what they do and what they do not do.
When used correctly, 302 redirects protect your SEO by preventing permanent changes from being recorded for temporary conditions. A seasonal product page that uses a 302 during the off-season keeps its rankings ready for when the product returns. A page undergoing A/B testing retains its authority while the test variant collects data.
For affiliate program managers, advertisers, and publishers, 302 redirects are not just a technical SEO concern — they are a practical tool embedded in everyday workflows.
Advertisers frequently run limited-time promotions that require redirecting traffic from standard product pages to promotional landing pages. A 302 redirect lets the program manager:
Example workflow: An advertiser is running a Black Friday promotion from November 20–30. The standard product page at /widget gets a 302 redirect to /black-friday-widget-deal. Publishers’ existing affiliate links continue working. When the promotion ends, the 302 is removed, traffic returns to /widget, and no publisher links are broken.
Affiliate managers testing conversion rates on different landing pages can use 302 redirects to split traffic between variants. The original affiliate tracking URL remains the canonical address, and the temporary test destinations receive traffic without permanently altering the indexed page. Once the test identifies the winner, the manager can implement the preferred page as the permanent destination and update the tracking configuration.
Some affiliate programs use 302 redirects to send users to region-specific or device-specific landing pages. A click from a mobile user in Germany might be temporarily redirected to a German-language mobile landing page, while desktop users in the US go to the standard page. Because these rules change based on campaign objectives, a 302 redirect is the appropriate signal.
For sites running on Apache servers, add the following line to your .htaccess file:
Redirect 302 /old-page https://example.com/temporary-page
RewriteEngine On
RewriteRule ^old-page$ https://example.com/temporary-page [R=302,L]
In your server block configuration file:
location /old-page {
return 302 https://example.com/temporary-page;
}
For custom applications, set the status code and Location header manually:
<?php
header('Location: https://example.com/temporary-page', true, 302);
exit;
?>
Most modern CMS platforms include built-in URL redirect management. In Shopify, navigate to Online Store > Navigation > URL Redirects. In Magento 2, go to Marketing > SEO & Search > URL Rewrites. Both platforms default to 301 redirects; check the dropdown or settings panel to select 302 explicitly.
Implementation methods vary by server environment and platform.
For sites running on Apache servers, add the following line to your .htaccess file:
Redirect 302 /old-page https://example.com/temporary-page
RewriteEngine On
RewriteRule ^old-page$ https://example.com/temporary-page [R=302,L]
In your server block configuration file:
location /old-page {
return 302 https://example.com/temporary-page;
}
Free plugins handle redirects without touching server files:
For custom applications, set the status code and Location header manually:
<?php
header('Location: https://example.com/temporary-page', true, 302);
exit;
?>
Most modern CMS platforms include built-in URL redirect management. In Shopify, navigate to Online Store > Navigation > URL Redirects. In Magento 2, go to Marketing > SEO & Search > URL Rewrites. Both platforms default to 301 redirects; check the dropdown or settings panel to select 302 explicitly.
Verifying that a redirect is returning the correct status code is a critical step before launching any redirect configuration. Several methods are available at no cost.
F12 or Ctrl+Shift+I).302 (or 301, 307, etc.).curl -I https://example.com/old-page
HTTP/2 302
location: https://example.com/temporary-page
-L to follow the redirect chain and see where it ends:curl -IL https://example.com/old-page
The URL Inspection tool shows how Googlebot sees your page. If Google is indexing the destination URL instead of the original, the tool will indicate this under “Page indexing” > “Canonical URL.”
The “too many redirects” error (often displayed as ERR_TOO_MANY_REDIRECTS in Chrome) occurs when a browser gets stuck in a redirect loop — page A redirects to page B, which redirects back to page A, creating an infinite cycle. After approximately 20 redirects, the browser gives up and shows the error.
curl -IL or a redirect checker to identify the loop.The most frequent cause is an Apache .htaccess rule, Nginx configuration line, or CMS redirect setting that you may have forgotten about — or that a plugin added automatically. Check your server configuration files for any Redirect or RewriteRule directives targeting the URL in question.
WordPress, for example, automatically redirects URLs when it detects a slug change. If you changed a post’s permalink, WordPress creates an internal redirect from the old slug to the new one — and this may return a 302 depending on your permalink settings.
Many sites use 302 redirects to send unauthenticated users to a login page. If you are accessing a protected resource without being logged in, a 302 to /login is expected behavior.
Some server configurations redirect URLs with missing or extra trailing slashes. For instance, /page may return a 302 redirecting to /page/. While this is usually harmless, excessive trailing-slash redirects can waste crawl budget on large sites.
Optimize your website with best practices for 302 redirects and ensure seamless user experience and SEO performance.

Learn when to use 302 redirects for temporary URL changes. Discover best practices, SEO implications, and how 302 redirects differ from 301 redirects in our com...

Learn how 302 redirects work, their SEO impact, and best practices for implementation. Understand temporary redirects vs permanent 301 redirects with technical ...

Learn critical mistakes to avoid with 302 redirects. Discover when to use temporary redirects, SEO implications, and best practices for affiliate marketing plat...
Cookie Consent
We use cookies to enhance your browsing experience and analyze our traffic. See our privacy policy.