307 redirect (Temporary Redirect)
A temporary redirect that guarantees the client repeats the request with the same method and body at the new URL.
How Google handles a 307
Google treats 307 like 302: a temporary redirect, with the original URL usually kept in the index.
Use a 307 for
- Temporarily moving an endpoint that receives POST, PUT or DELETE
- Maintenance redirects on APIs
- Any temporary move where the method must not change
Don’t use it for
- Permanent moves: use 308 (method kept) or 301
What happens to a POST
A browser sends POST /checkout with a form body. The server answers with…
Temporary, method kept. The browser repeats the exact POST, body included, at /pay. Use it for temporarily moved endpoints.
Setting up a 307
Apache (.htaccess)
RewriteRule ^api/v1/(.*)$ /api/v1-temp/$1 [R=307,L]Nginx
location /api/v1/ { return 307 /api/v1-temp$request_uri; }vercel.json
{ "redirects": [{ "source": "/api/v1/:path*", "destination": "/api/v1-temp/:path*", "statusCode": 307 }] }Netlify _redirects
/api/v1/* /api/v1-temp/:splat 307Need rules for a whole list of URLs? The redirect rule generator writes them for Apache, Nginx, Vercel and Netlify.
Check that it works
Questions
Why does Chrome DevTools show “307 Internal Redirect”?
That is not your server. The browser has an HSTS policy for the site and upgrades http:// to https:// itself before sending anything, showing it as a synthetic 307. Our checker does not have HSTS state, so it shows what your server really sends (usually a 301).
307 or 302?
For normal page GETs they behave the same. Choose 307 when the request might be a POST or other method that must be preserved.
Other codes: 301 · 302 · 303 · 308 · 301 vs 302