HTTP 302: Found (Temporary Redirect)
The temporary redirect: use with caution, monitor rigorously.
The HTTP 302 status code, officially named "Found" (formerly "Moved Temporarily"), indicates that the requested resource is temporarily located at a different URL. Unlike the 301 permanent redirect, 302 tells clients that the original URL should continue to be used for future requests.
The 302 redirect is often misused in situations where a 301 would be more appropriate. This confusion can have significant negative consequences for SEO, as search engines treat these two codes very differently. While 301 transfers ranking authority, 302 keeps it on the original URL.
Proper monitoring of 302 redirects is essential to identify those that should be converted to 301s, detect accidental temporary redirects, and ensure redirected pages work correctly during the transition period.
Technical meaning of HTTP 302
Understanding the exact semantics of 302 is crucial for proper implementation:
- Temporary nature: The server indicates the resource is temporarily at another address. The client should use the original URL for future requests.
- No caching: Unlike 301, browsers should not cache 302 redirects. Each request re-evaluates the redirect.
- Method preservation: Historically, 302 could change the method (POST → GET). For strict method preservation, use 307 instead.
- SEO behavior: Search engines don't transfer ranking authority for 302s. The original URL retains its SEO value.
Legitimate use cases for 302
HTTP 302 should be used only when the redirect is genuinely temporary:
- Scheduled maintenance: Redirecting to a maintenance page during updates. The original page will return once maintenance is complete.
- A/B testing: Temporarily redirecting a portion of traffic to test a new version of a page before permanent deployment.
- Geolocation: Redirecting users to localized content based on their location, while maintaining the canonical URL.
- Authentication flows: Redirecting unauthenticated users to a login page, then back to the original resource after login.
Common mistakes to avoid
Misusing 302 can harm your SEO and confuse search engines:
- HTTPS migration: Using 302 for http→https redirect. This should always be 301 as the change is permanent.
- Persistent 302s: 302 redirects that stay in place for months or years. If it's permanent, convert to 301.
- URL canonicalization: Using 302 for www/non-www or trailing slash normalization. These should be 301 redirects.
- Page moves: Using 302 when a page permanently moves to a new location. Use 301 to transfer SEO value.
How to implement a 302 redirect
Implementing a 302 redirect is similar to 301, with different codes:
# Apache (.htaccess)
Redirect 302 /maintenance https://example.com/temp-page
# or with RewriteRule
RewriteRule ^page$ /temp-page [R=302,L]
# Nginx
server {
rewrite ^/maintenance$ /temp-page redirect;
}
# PHP
header("Location: https://example.com/temp-page", true, 302);
exit();
Document the reason and expected duration for every 302 redirect. Set calendar reminders to review and convert to 301 or remove when the temporary situation ends.
Monitoring your 302 redirects
Effective monitoring of 302 redirects prevents SEO issues and forgotten temporary measures:
- Duration tracking: Monitor how long each 302 has been in place. Alert when a 302 exceeds your defined temporary threshold (e.g., 30 days).
- Destination health: Verify that 302 targets return HTTP 200. A 302 to a broken page creates a poor user experience.
- SEO audit: Regularly audit 302s to identify those that should be 301s. Persistent 302s may be interpreted as 301s by Google anyway.
- Documentation compliance: Ensure every 302 has documented justification and planned end date. Undocumented 302s are often forgotten.
302 redirect checklist
- The redirect is genuinely temporary with a defined end date
- The destination URL returns HTTP 200
- Documentation exists explaining why 302 (not 301) was chosen
- A calendar reminder is set to review/remove the redirect
- SEO team has been notified if the redirect affects important pages
- Monitoring is in place with duration-based alerts
Frequently asked questions about HTTP 302
When should I use 302 instead of 301?
Use 302 only when the original URL will be restored, such as during maintenance, A/B testing, or temporary promotions. If the change is permanent, always use 301 to transfer SEO value.
Does Google treat 302 as 301 over time?
Yes, Google may interpret a long-standing 302 as a 301 and eventually transfer ranking. However, this behavior is unpredictable. Use the correct code from the start to avoid ambiguity.
What is the difference between 302 and 307?
307 strictly preserves the HTTP method (POST stays POST), while 302 historically allowed method changes. For API endpoints or form submissions, 307 is safer. For browser redirects, 302 is common.
How does 302 affect my crawl budget?
Search engines may crawl both the original and destination URLs for 302s, using more crawl budget. For large sites, unnecessary 302s can slow down indexing of important pages.
Can I use 302 for URL shorteners?
It depends on the use case. URL shorteners often use 301 to pass SEO value. Use 302 only if you want the shortener URL (not the destination) to appear in search results.
How do I convert a 302 to a 301?
Simply update the redirect code from 302 to 301 in your web server configuration. Search engines will re-crawl and recognize the change, though full SEO transfer may take weeks.
Conclusion
The HTTP 302 redirect is a useful tool for genuinely temporary situations, but it's frequently misused. Understanding when to use 302 versus 301 is crucial for SEO optimization and user experience. When in doubt, ask yourself: "Will the original URL return?" If not, use 301.
MoniTao helps you monitor all your 302 redirects, track their duration, and alert you when temporary redirects may need to be converted to permanent ones. Set up monitoring rules to prevent forgotten 302s from harming your SEO.
Useful Links
Ready to Sleep Soundly?
Start free, no credit card required.