HTTP Redirects: 301 vs 302 vs 307 vs 308
The four redirect status codes, when to use each, and how each affects rankings and passed link equity.
The four redirect status codes, when to use each, and how each affects rankings and passed link equity.
Why redirects exist
HTTP redirects are server-side instructions that automatically send users and search engine crawlers from one URL to another. They are a necessary component of website management, handling scenarios such as:
- Site redesigns and migrations: When content moves to a new URL or an entire site is restructured.
- URL consolidation: Combining multiple URLs that provide similar content into a single, canonical URL.
- Deletion of outdated content: Directing users from a removed page to a relevant, existing page.
- Protocol changes: Guiding traffic from HTTP to HTTPS versions of pages.
- Domain changes: Moving from an old domain to a new one.
Redirects ensure a seamless user experience and help maintain search engine rankings by passing link equity from the old URL to the new one. However, using the incorrect redirect type can lead to SEO issues, such as lost ranking signals or indexing problems.
301 permanent — the SEO default
A 301 redirect indicates that a page has permanently moved to a new location. It is the most common and SEO-friendly type of redirect when content has been moved or deleted permanently.
When a server sends a 301 status code, search engines understand that the old URL should no longer be considered the authoritative source for the content. Instead, all ranking signals, including link equity (often referred to as "link juice"), should be transferred to the new URL.
Google officially confirmed in 2016 that 301 redirects pass nearly 100% of ranking signal to the new URL. This means that if old-page.com/topic redirects with a 301 to new-page.com/topic-updated, search engines will treat new-page.com/topic-updated as if it were the original page, inheriting its accumulated SEO value.
When to use a 301 redirect:
- You have permanently moved a page to a new URL.
- You are migrating your website to a new domain.
- You are changing your site from HTTP to HTTPS.
- You are correcting canonicalization issues (e.g., redirecting non-www to www or vice versa).
- You are consolidating duplicate content by pointing multiple URLs to a single, preferred version.
Example 301 redirect in an Apache .htaccess file:
Redirect 301 /old-page.html https://www.example.com/new-page.html
Example 301 redirect in Nginx server configuration:
location /old-page.html {
return 301 https://www.example.com/new-page.html;
}
302 temporary — for A/B tests and staging
A 302 redirect indicates that a page has temporarily moved to a new location, but the original URL is expected to return. Search engines interpret this as a signal that the redirect is not permanent, and they should typically retain the original URL in their index.
Historically, 302 redirects were sometimes problematic for SEO because search engines were less consistent in how they handled link equity for temporary redirects. However, Google has become more sophisticated in interpreting redirects. While a 302 still signals "temporary," if it persists for an extended period, search engines may eventually treat it as a permanent move and transfer ranking signals, similar to a 301.
Despite this, it is crucial to use 302s only when the move truly is temporary, to avoid confusion for both users and search engine crawlers.
When to use a 302 redirect:
- You are conducting A/B testing on a new page design or content, and you want to direct a portion of traffic to the test page.
- You are running a temporary promotion or seasonal campaign on a different URL.
- You are directing users to a localized version of a page based on their region, but the original page remains the primary version.
- You are performing maintenance on a page and temporarily redirecting users to an "under construction" page.
- You have a staging environment that you want to prevent from being indexed while testing changes.
Example 302 redirect in an Apache .htaccess file:
Redirect 302 /temporary-page.html https://www.example.com/new-temporary-page.html
Example 302 redirect in Nginx server configuration:
location /temporary-page.html {
return 302 https://www.example.com/new-temporary-page.html;
}
307 and 308 — the HTTP/1.1 equivalents
The 307 (Temporary Redirect) and 308 (Permanent Redirect) status codes were introduced with HTTP/1.1 as stronger, explicit versions of 302 and 301, respectively. Their primary distinction lies in how they handle the HTTP method (e.g., GET, POST) of the original request.
307 Temporary Redirect
The 307 redirect is the HTTP/1.1 successor to the 302. The key difference is that client applications (browsers) are explicitly instructed to re-send the request to the new URL using the exact same HTTP method as the original request. This maintains the integrity of form submissions (POST requests) which might otherwise default to a GET request with a 302.
From an SEO perspective, a 307 is treated similarly to a 302: it indicates a temporary move, and search engines generally retain the original URL in the index and do not transfer primary ranking signals.
When to use a 307 redirect:
- When a temporary redirect is needed and it is critical that the HTTP method of the original request (especially POST) is preserved for the redirected request.
- When explicitly redirecting HTTP traffic to HTTPS using HTTP Strict Transport Security (HSTS) which uses 307 internally.
- Modern browsers often implement 307 redirects for internal redirection (e.g., HSTS) or when following redirects that explicitly specify preventing method changes.
308 Permanent Redirect
The 308 redirect is the HTTP/1.1 successor to the 301. Like the 307, its main characteristic is ensuring that the HTTP method of the original request is preserved when redirecting to the new URL. This is particularly useful for API endpoints or forms where POST requests must remain POST requests after redirection.
For SEO, a 308 redirect functions identically to a 301: it signifies a permanent move, and search engines will transfer virtually all ranking signals to the new URL.
When to use a 308 redirect:
- When a permanent redirect is needed and it is critical that the HTTP method of the original request (especially POST) is preserved for the redirected request.
- In modern web development, particularly with APIs or single-page applications, 308 is often preferred over 301 when method preservation is a concern.
General Guidance: For most SEO purposes, 301 is still the widely recognized and recommended choice for permanent moves, and 302 for temporary ones. The explicit method preservation of 307 and 308 makes them valuable in specific technical scenarios, but their SEO implications are largely the same as their 302 and 301 counterparts, respectively.
Redirect chains and loops — kill them
Redirect chains occur when a URL redirects to another URL, which then redirects to a third URL, and so on. For example: Page A > Page B > Page C. Each hop in the chain adds latency, slowing down page load times for users. More critically, search engine crawlers consume their crawl budget following these chains. Long chains can also dilute the passing of link equity, as some may be lost at each hop, although modern search engines are better at handling them.
Redirect loops occur when a URL eventually redirects back to itself within a chain, creating an infinite loop. For example: Page A > Page B > Page A. This prevents both users and search engine crawlers from ever reaching a final destination. Browsers will typically display an error message (e.g., "Too many redirects"), and search engines will abandon crawling the page, leading to de-indexing or failure to index.
Impact on SEO:
- Crawl Budget Wastage: Search engines have a limited budget for crawling your site. Chains and loops consume this budget inefficiently.
- Loss of Link Equity: While search engines are improving, long redirect chains can still slightly diminish the amount of link equity passed.
- Poor User Experience: Users face delays or errors, leading to frustration and bounce.
- Indexing Issues: Pages involved in loops or very long chains may not be indexed correctly or at all.
How to address redirect chains and loops:
The goal is always to redirect directly from the original URL to the final destination URL in a single hop.
- Identify the origin: Use site auditing tools to find where the chains begin.
- Simplify: Update all intermediate redirects to point directly to the final destination.
- Test: After making changes, verify that the redirects now go directly to the final URL.
For example, if you have old-page-1 -> old-page-2 -> new-final-page, you should change old-page-1 to redirect directly to new-final-page.
How LemRank audits redirect health
LemRank's Site Audit tool systematically scans your website to identify and report on various redirect issues, providing actionable insights to maintain your SEO health.
Our crawler respects your robots.txt file, ensuring that it only accesses pages you permit. To avoid overwhelming your server, the crawler observes a rate limit of 10 requests per second. This ensures a thorough scan without negatively impacting your site's performance. The audit is re-scanned on a weekly cadence to provide up-to-date information on your site's redirect status.
LemRank identifies the following redirect-related issues:
- Redirect Chains: Detects sequences of multiple redirects before reaching a final URL. This highlights opportunities to optimize redirect paths for speed and SEO.
- Redirect Loops: Pinpoints infinite redirect loops that prevent users and crawlers from accessing content.
- Temporary Redirects (302/307) for Permanent Moves: Flags instances where a temporary redirect is used on a page that appears to have moved permanently. While not always an error, this often indicates an SEO opportunity to switch to a 301/308 redirect for full link equity transfer.
- Broken Redirects: Identifies redirects that point to a non-existent page (4xx error) or a server error (5xx error).
- Pages with Redirects Still in Sitemap: Alerts you if a page that redirects is still listed in your XML sitemap, which can confuse search engines and waste crawl budget.
- Redirects to Non-Canonical URLs: Finds redirects that lead to a version of a page that is not the declared canonical version, indicating a potential conflict in your canonicalization strategy.
By surfacing these issues, LemRank helps you streamline your redirect strategy, preserve link equity, improve user experience, and optimize your crawl budget.
Related
Frequently asked questions
Do 301 redirects still lose PageRank?
No — Google confirmed in 2016 that 301, 302, and 307 all pass full PageRank. The old "15% loss" rule is deprecated.
What is a redirect chain?
URL A redirects to B, which redirects to C. Every hop adds latency and (historically) some signal loss. Best practice: always redirect directly to the final destination.
Should I use 302 for maintenance pages?
Yes — 302 tells search engines "this is temporary, don't replace the original URL in your index". Use 503 for actual downtime if possible.
Related articles
Was this page helpful?
Try LemRank free
14-day Pro trial. No credit card required.