301 vs 302 redirects: which one should you use for SEO?
guide // , 6 min read, by Darthwares
When moving a page on your website, choosing the correct URL redirect is crucial for maintaining search engine optimization (SEO) value. A 301 redirect signals a permanent move, instructing search engines to update their records and transfer any accumulated SEO ranking to the new page. A 308 redirect also indicates a permanent move, and search engine robots will update the original URL for the resource. In contrast, a 302 or 307 redirect indicates a temporary change, preserving the original page's SEO value without transferring it to the new, temporary location.
On this page // 8 sections
The short version
- Use 301 redirects for permanent page moves to transfer SEO value.
- Use 308 redirects for permanent moves that preserve the request method.
- Use 302 or 307 redirects for temporary changes to keep original SEO value.
- 308 and 307 redirects preserve the original request method and body.
- Avoid redirection loops, as they break the user experience.
What is a URL redirect?
URL redirection, also known as URL forwarding, is a technique that allows a single page, form, website, or web application to have more than one URL address. In HTTP, a server triggers a redirection by sending a special redirect response when a request is made for a specific URL.
This technique is used when a requested resource cannot be accessed from its original location but is available elsewhere. It is important to avoid creating redirection loops, as these can completely disrupt the user experience by sending a browser into an endless cycle of redirects.
What is a 301 redirect?
The 301 "Moved Permanently" status code indicates that a resource has been assigned a new, permanent URL. IETF (Internet Engineering Task Force) documentation states that any future references to this resource should use the new URL. MDN Web Docs further explains that a browser receiving a 301 status will automatically request the resource at the new URL, redirecting the user.
For search engine optimization, MDN Web Docs notes that search engines receiving a 301 response will attribute links and SEO ranking from the original URL to the redirected resource. This means search engine robots and other crawlers will update their records to use the new URL for the resource. Historically, IETF documentation mentions that a user agent might change the request method from POST to GET for the subsequent request. MDN Web Docs confirms that in the Fetch Standard, a user agent uses the GET method after a 301 response to a POST request, as permitted by the HTTP specification, and that older clients incorrectly handled this to use GET.
What is a 308 redirect?
The 308 "Permanent Redirect" status code also indicates that a requested resource has been permanently moved to a new URL, as documented by MDN Web Docs. Similar to a 301, a browser receiving this status will automatically request the resource at the new URL, redirecting the user to the new page.
The key difference, according to MDN Web Docs, is that with a 308 redirect, the client will not modify the request method or the body in the redirected request. While a 301 redirect requires the method and body to remain unchanged, older clients sometimes incorrectly used the GET method. Therefore, MDN Web Docs suggests using a 308 redirect to ensure user agents do not alter the request method, as altering the method after a 308 response is prohibited.
What is a 302 redirect?
The 302 "Found" status code indicates that the target resource resides temporarily under a different URL, according to IETF documentation. Unlike permanent redirects, MDN Web Docs states that search engine robots and other crawlers do not memorize this new, temporary URL. This means no SEO value is transferred from the original page.
Historically, IETF documentation notes that a user agent might change the request method from POST to GET for the subsequent request after a 302. MDN Web Docs clarifies that older clients incorrectly changed the method to GET. When the original request method is GET, the behavior of 302 and 307 responses is identical.
What is a 307 redirect?
The 307 "Temporary Redirect" status code, as documented by MDN Web Docs, indicates that a requested resource has been temporarily moved to a new URL. A browser receiving this status will automatically request the resource at the new URL, redirecting the user.
MDN Web Docs specifies that search engines receiving a 307 response will not attribute links to the original URL to the new resource, meaning no SEO value is transferred. The main distinction between 307 and 302 is that, according to MDN Web Docs, the 307 status means the client will not change the request method and body when the redirected request is made. In contrast, with 302, older clients incorrectly changed the method to GET. However, when the original request method is GET, 307 and 302 responses are identical.
When should you use a permanent redirect?
You should use a permanent redirect, such as a 301 or a 308, when the original URL should no longer be used and has been replaced with a new one. IETF documentation states that a 301 indicates the target resource has been assigned a new permanent URI, and future references should use it. MDN Web Docs reiterates that both 301 and 308 codes signify that a resource has been permanently moved. For permanent moves, search engine robots will update the original URL for the resource.
For a 301 permanent redirect, the primary benefit for SEO is that search engines will attribute links and ranking from the original URL to the new, redirected resource. This ensures that the SEO value built up by the old page is transferred to its new location, preserving its visibility in search results.
When should you use a temporary redirect?
A temporary redirect, either a 302 or a 307, is appropriate when a requested resource cannot be accessed from its usual location but is temporarily available elsewhere. IETF documentation specifies that a 302 indicates the target resource resides temporarily under a different URI. Similarly, MDN Web Docs states that a 307 indicates a resource has been temporarily moved.
The key reason to use a temporary redirect is to avoid transferring SEO value. MDN Web Docs clarifies that search engines will not attribute links or SEO value from the original URL to the new, temporary resource. This preserves the original page's ranking for when it returns to its canonical location, without giving the temporary page any lasting SEO benefit.
Common questions
What is the main difference between a 301 and a 308 redirect?
Both 301 and 308 redirects indicate a permanent move of a resource. The main difference is that with a 308, the client will not modify the request method or body during the redirection, and altering the method after a 308 response is prohibited. In contrast, older clients might incorrectly change a POST request to GET with a 301.
What is the main difference between a 302 and a 307 redirect?
The key distinction is that, as MDN Web Docs explains, with 307 the client's request method and body are not modified when the redirected request is made. In contrast, with 302, older clients incorrectly changed the method to GET. When the original request method is GET, their behavior is identical.
Do temporary redirects pass SEO value?
No, temporary redirects (302 and 307) do not pass SEO value. MDN Web Docs states that search engines will not attribute links or SEO ranking from the original URL to the new, temporary resource. Search engine robots also do not memorize the temporary URL.
Why should I avoid redirection loops?
Redirection loops should be avoided because they completely break the user experience. When a browser encounters a loop, it gets stuck in an endless cycle of redirects, preventing the user from accessing the intended content.
How do search engines treat permanent redirects?
For permanent redirects (301 and 308), search engines update their records to use the new URL for the resource. MDN Web Docs notes that for a 301 redirect, search engines will attribute links and SEO ranking from the original URL to the redirected resource, effectively transferring the SEO value to the new page.
Primary sources and further reading
This article was researched and written by an AI model and published automatically. It was written from sentences that were checked to appear on the pages below, but a person has not reviewed the text. If something is wrong, tell us at chibivikramathithan@darthwares.com and we will correct it.