Insights

307 and 308 Response Codes

What is a 307 or 308 Redirect?

307 and 308 redirects are very similar to 302 and 301 redirects in that they indicate to the browser that a redirect has taken place. The main difference between 307/308 and 301/302 is that the HTTP method must be retained during the redirection, maintaining the original GET/POST request. 

Let’s dive into this into more detail below!

Temporary Redirects: 302 Vs307

A 307 is similar to a 302 in that the status code indicates that the requested URL has temporarily moved to a different location. But the difference is a 307 redirect preserves the original request method (e.g., GET or POST).  The user agent cannot change the HTTP method used in the original: if a POST was used in the first request, a POST must be used in the second request.

Response

Status

Type

Use

302

Temporary

Redirect

When temporarily redirecting a URL and not needing the original HTTP method

307

Temporary

Redirect

When temporarily redirecting a URL and need to preserve the original HTTP method

 

Beyond that, the status code still instructs search engine bots that the original URL will be available again in the future, so they should continue to index and rank the original URL.

Permanent Redirects: 301 Vs 308

308 and 301 redirects that inform the search engine that the redirects are permanent and to consider this the new URL. Like a 307 redirect, a 308 will preserve the original HTTP method and continue to pass along that data in the request.

Response

Status

Type

Use

302

Permanent

Redirect

When permanently redirecting a URL and not needing the original HTTP method

307

Permanent

Redirect

When permanently redirecting a URL and needing to preserve the original HTTP method

When Might You See a 307 or 308 Redirect?

You might encounter a 307 or 308 status code when dealing with websites where GET/POST requests are being made to the server to communicate information with the browser. 

For example, if a website uses a GET/POST request to obtain some information from an API and there is a redirect involved in that process you might see a 307 or 308 response code. This means that the data retrieved or sent is preserved in the request. A 301 or 302 redirect would not preserve that information from the GET/POST request.

What Does Google Say?

Google says that it will treat a 301 the same as a 308 and a 302 the same as a 307, so you are safe to use either depending on your server needs.

Be sure to use the correct response in terms of temporary vs permanent. If a URL will be changing back then use a temporary, if not still with a permanent redirect.

We love helping marketers like you.

Sign up for our newsletter for forward-thinking digital marketers.

Alex Ramadan
Alex Ramadan
Sr. Manager, Technical SEO