Skip to content
Webmaster Tools
Inspect & debugHTTP Status Codes307 Temporary Redirect

307 Temporary Redirect

What HTTP 307 Temporary Redirect means, how it keeps the method and body unlike 302, why browsers show a 307 Internal Redirect for HSTS, and how Google treats it.

All status codes

What 307 means

The resource is temporarily at the URL in the Location header, and the client must repeat the request there with the same method and body. 307 is defined in RFC 9110 §15.4.8. It was created because clients turn a POST into a GET when following a 302; 307 forbids that.

HTTP/1.1 307 Temporary Redirect
Location: https://api2.example.com/v1/upload

A POST of a file to the old URL becomes the same POST, with the same body, to the new one. Like 302, a 307 is temporary: clients keep using the original URL for future requests, and the response isn't cached unless Cache-Control or Expires say so.

Permanent Temporary
Method may change to GET 301 302
Method and body kept 308 307

When to use it

  • Temporarily moving an API endpoint or form handler that receives POST, PUT or DELETE.
  • Sending requests to another region or server during maintenance or a failover.
  • Any temporary redirect where you want precise behaviour; for plain GET pages, 302 and 307 act the same.

The "307 Internal Redirect" in your browser

If DevTools shows 307 Internal Redirect from http:// to https:// (with Non-Authoritative-Reason: HSTS), your server didn't send it. The browser has the site on its HSTS list, from a Strict-Transport-Security header or the preload list, and upgrades the URL itself before any request leaves. Your server might really answer the http:// URL with a 301, a 302 or nothing at all. To see what the server sends, check from a client without HSTS state, such as curl -I or an online checker.

How to send it

nginx: return 307 https://new.example.com$request_uri;. Apache: Redirect 307 /old /new or RewriteRule ^old$ /new [R=307,L]. Cloudflare Redirect Rules offer 307 as a status. Express: res.redirect(307, '/new').

Watch out for clients that can't re-send the body: a library can only repeat a POST if it can read the body again, so streamed uploads may not be followed automatically (Go's http.Client, for example, needs GetBody). curl -L follows a 307 and keeps the method and body. Test the whole flow with the real client.

307 and SEO

Google treats 307 the same as 302: a temporary redirect, a weak signal that the target should be canonical, and the original URL usually stays indexed. For a permanent move of pages, use 301 or 308. The HSTS internal 307 has no SEO effect at all, since Googlebot never sees it.

See the status your server really sends for each hop, without your browser's HSTS cache, with the Redirect Checker.