When a URL redirects to another address, an HTTP status code is involved in the background. The status codes 301, 302, 307, and 308 are particularly common.
All four can redirect a browser to a different URL. Technically, however, they do not mean the same thing. A key difference is whether the redirect is intended to be permanent or temporary. With 307 and 308, the handling of the original HTTP method also comes into play.
In this article, we explain the differences and show which redirect type is intended for which use case.
Briefly explained: 301 and 308 stand for permanent redirects. 302 and 307 are intended for temporary redirects. 307 and 308 additionally guarantee that the HTTP method and request body are not changed during the redirect.
What happens during an HTTP redirect? #
When your browser opens a URL, it sends an HTTP request to the responsible web server.
For a normal successful request, the server can respond with the following status, for example:
200 OK
The requested content will be delivered afterwards.
In the case of a redirection, however, the server responds with a redirect status code and informs the client via the HTTP response under which other URL the resource can be reached.
Simplified:
Browser requests URL A
↓
Server responds with redirect
↓
New address: URL B
↓
Browser calls URL B
↓
Server delivers content
For visitors, this process usually happens automatically.
What do 301, 302, 307, and 308 mean? #
The four status codes can initially be distinguished between permanent and temporary:
301 → permanent
302 → temporary
307 → temporary
308 → permanent
However, there is still a technical difference between 301 and 308, as well as between 302 and 307, which is particularly relevant for HTTP methods other than GET can become relevant.
301 – Moved Permanently #
The status code 301 Moved Permanently indicates that the requested resource is permanently available under a different URL.
A typical example is a permanently changed page address:
https://example.com/altes-angebot/
↓ 301
https://example.com/neues-angebot/
The old address has been permanently replaced by the new one.
301 is therefore one of the most important status codes for website relaunches, changed URLs, and permanently moved content.
We explain how to practically set up such a redirection under Set up a 301 redirect: Permanently redirect URLs.
When does a 301 redirect make sense? #
A 301 redirect is appropriate, for example, when a page permanently gets a new URL, an old page has been replaced by suitable new content, or the URL structure changes permanently during a relaunch.
Even during a permanent domain change, 301 redirects can be part of a clean migration.
Important: „Permanent“ here does not mean that you are never allowed to change the technical rule again. It describes the information that the server communicates to the client regarding the status of the requested resource: The previous URL has been permanently replaced by another destination.
302 – Found #
The status code 302 Found is used for a temporary redirect.
The original URL fundamentally remains the actual address of the resource.
A simplified example:
URL A
↓ 302
URL B
URL A should later become the regular destination again.
A temporary redirect can be used, for example, when content is only temporarily provided at a different address.
Why is 302 called „Found“? #
The designation may seem confusing at first. Historically, this status code has been interpreted and used in various ways.
For the practical work on a website, the most important thing is: 302 stands for a redirection not declared as permanent.
If the URL change is actually permanent, you should not use a 302 redirect simply out of habit.
307 – Temporary Redirect #
The status code 307 Temporary Redirect also describes a temporary redirect.
Unlike 302, 307 explicitly specifies that the client must not change the original HTTP method and request body when redirecting.
This is particularly relevant for requests that do not use the usual method GET take place.
What does HTTP method mean? #
An HTTP request has a method, among other things. Two common methods are:
GET → Retrieve resource
POST → Send data to a server
normal web page request in a browser is typically a GET-Request.
Forms or web applications, on the other hand, can, for example, POST use.
Why is the method relevant for redirects? #
Assuming a client sends data with a POST-Request to a URL.
With a 307 redirect, the redirected request must still be as POST take place and the request body be retained.
POST /old-url
↓
307 Temporary Redirect
↓
POST /new-url
Precisely this guaranteed retention of the method technically distinguishes 307 from 302.
For normal website operators: For standard page requests using GET, this difference often plays no visible role. For forms, APIs, and web applications, however, it can be crucial.
308 – Permanent Redirect #
The status code 308 Permanent Redirect describes a permanent redirect.
As with 307, the original HTTP method and the request body must be preserved during the redirection.
Simplified:
POST /old-url
↓
308 Permanent Redirect
↓
POST /new-url
308 thus combines two properties:
Permanent redirect
+
HTTP method is preserved
What is the difference between 301 and 308? #
Both status codes indicate a permanent redirect.
The decisive technical difference lies in the handling of the HTTP method.
At 308 it is expressly stipulated that the method and request body must be used unchanged.
At 301 this guarantee does not exist in the same form. Historically, clients can change behavior, especially with certain non-GET requests.
For the classic redirection of a normal website from an old GET URL to a new URL, 301 still an established and suitable status code.
What is the difference between 302 and 307? #
Both indicate a temporary redirect.
Here, too, the technical difference lies primarily in the handling of the HTTP method:
302
temporary
Method is not guaranteed to be used in the same way
307
temporary
Method and request body must be preserved
For technically sensitive requests where the original method must be strictly preserved, 307 thus offers a more unambiguous semantics.
The four redirects in direct comparison #
| Status code | Meaning | Permanently? | Keep method? |
|---|---|---|---|
301 | Moved Permanently | Yes | Not guaranteed like with 308 |
302 | Found | No | Not guaranteed like with 307 |
307 | Temporary Redirect | No | Yes |
308 | Permanent Redirect | Yes | Yes |
Which status code should I use? #
For a regular website, you can start by asking a simple question:
Is the change permanent or temporary?
Permanent?
│
├── Yes → 301 or technically 308
│
└── No → 302 or technically 307
For normal page redirects, 301 is very common for permanent URL changes.
If it must also be guaranteed that an HTTP method like POST remains unchanged, the differences between 301/308 and 302/307 become relevant.
Example: Page permanently renamed #
A previous service page:
was permanently replaced by:
A permanent redirect makes sense here.
/webhosting-alt/
↓ 301
/webhosting/
Example: Content moved temporarily only #
Assuming a resource is only temporarily accessible under a different URL and is later supposed to be used under its previous address again.
Then the redirection should not be marked as a permanent move.
original URL
↓
temporary redirect
↓
temporary destination
Depending on the technical use case, 302 or 307 can be used for this.
Example: Form or application #
In a web application, a request can contain data with POST transfer.
If this request needs to be temporarily redirected to another endpoint and as POST The semantics of 307 must be preserved is relevant.
POST /formular-alt
↓
307
↓
POST /formular-neu
Such cases differ from the traditional redirection of a normal content page.
Redirects and search engines #
Search engines take HTTP redirects into account when crawling and processing URLs.
A permanent redirect signals that a resource has been permanently moved to another destination. A temporary redirect, on the other hand, signals that the original URL may fundamentally remain relevant.
Therefore, the status code should describe the actual state as accurately as possible.
Important for SEO: Do not choose the status code based on which one you expect to give you a supposed „SEO advantage“. Use the code that correctly describes the actual technical state.
Do 301 redirects pass SEO power? #
In the SEO environment, redirects are often simplified as a method by which so-called „link power“ or „SEO power“ is transferred.
This representation is too broad.
A permanent redirection is initially a technical signal that a resource is permanently accessible at a different URL. Search engines can process this signal along with other information.
However, a redirect does not automatically turn any target page into a better-ranking page.
In particular, an old URL should point to a new destination that makes sense in terms of content.
Don't build redirects solely for rankings #
Redirects should serve a real technical purpose.
The indiscriminate redirection of old or foreign URLs to a specific page with the goal of artificially improving rankings is not a clean website structure.
If a resource does not have a meaningful successor, a redirect of some kind does not necessarily have to be set up.
What happens with an incorrect redirect type? #
A website does not necessarily become unusable immediately just because a temporary redirect was used instead of a permanent one.
Nevertheless, the server thus provides different information about the status of the resource.
For long-term URL changes, you should therefore check whether a permanent redirect is actually configured.
Avoid redirect chains #
Regardless of the status code used, you should avoid unnecessary redirect chains.
Unfavorable:
URL A
↓ 301
URL B
↓ 302
URL C
↓ 301
URL D
If URL D the actual final destination and there are no technical reasons for the intermediate stops, the forwarding should be as direct as possible.
URL A
↓ 301
URL D
Avoid redirect loops #
A redirect loop occurs when redirection rules lead back to the starting point.
URL A
↓
URL B
↓
URL C
↓
URL A
As a result, no definitive goal can be achieved.
Browsers typically report in such cases that too many redirects have occurred.
Check redirects technically #
If you want to know which status code is actually returned, the browser's visible address bar alone is not enough.
While the browser can take you to the right destination, you cannot reliably tell from that whether, for example, 301, 302, 307 or 308 was used.
For technical inspection, you can use the network tab of the developer tools in a modern browser, among other things.
There, you can examine the HTTP response of the original request.
Correctly classifying HTTP status codes #
Redirections belong to the group of HTTP status codes in the range of 3xx.
Other status code groups have different tasks.
Examples:
2xx → successful request
3xx → redirection
4xx → problem with the request / resource
5xx → server-side error
We explain the most important status codes in more detail under HTTP status codes explained: 200, 301, 404, 403, and 500.
What does a 404 error have to do with redirects? #
If a page has been permanently moved to a new URL, but the old URL is simply deleted, a visit to the previous address can result in 404 Not Found End.
If there is a functionally matching successor, a permanent redirect to this new resource can be useful.
However, that does not mean that every 404 error should be automatically redirected.
We explain how to properly evaluate URLs that no longer exist under Find and fix 404 errors.
Browser redirects can be cached #
Browsers can cache permanent redirects in particular.
If you just changed a rule and still see the previous behavior, you should also test the URL in a private browser window or another browser.
For a reliable technical review, the actual HTTP response is also crucial.
HTTPS redirections #
Redirects are also frequently used to redirect requests from HTTP to HTTPS.
Example:
http://example.com/
↓
https://example.com/
This requires the redirection and the SSL/HTTPS configuration to match.
If HTTPS itself is not working correctly, the cause of the SSL or certificate problem should be resolved first.
We will cover this topic later under Check SSL Certificate and HTTPS: Identify Common Errors.
Retest redirects after changes #
If you change an existing redirect rule, you shouldn't just check the new destination afterwards.
Check also whether this has created an additional chain or loop.
For several related rules, it is recommended to test from the oldest still known URL to the final destination in each case.
Decision-making aid #
URL permanently moved?
│
├── YES
│ │
│ ├── normal page URL → often 301
│ │
│ └── method must strictly
│ be preserved → 308
│
└── NO
│
├── temporary redirect → 302
│
└── method must strictly
be preserved → 307
This representation is a guide. For complex applications, APIs, or special request workflows, the specific technical use case should be taken into account.
Summary #
Status codes 301, 302, 307, and 308 are all used to redirect an HTTP request, but they have different meanings.
301 and 308 indicate permanent redirects. 302 and 307 stand for temporary redirects.
At 307 and 308 the original HTTP method and the request body must be retained. This difference is particularly relevant for forms, APIs, and other non-GET requests.
For the classic permanent change of a normal website URL, a 301 redirect remains a typical use case.
Choose a redirect not based on supposed SEO benefits, but on what actually happens technically: permanent or temporary – and whether the original HTTP method needs to be preserved.