In short. Vercel uses 307 and 308 because they preserve the original request method across temporary and permanent redirects.
Definition: Vercel uses
307for a temporary redirect and308for a permanent redirect because these status codes preserve the request method when a client follows the target URL. This keeps a request such asPOSTmeaningful when it is redirected to another endpoint.
Key facts
- Vercel recommends
307or308when a redirect must handle methods other thanGET, because these codes remove the ambiguity around the follow-up method for a public API, as stated in the redirects documentation. - Vercel's configuration redirect reference defines
permanentas an optional boolean. Its default istrue;trueselects308, andfalseselects307, according to the vercel.json reference. - Vercel evaluates configuration redirects at build time and describes them as permanent
308or temporary307redirects in its configuration redirects documentation. - RFC 9110 says that
307and308were added to identify method-preserving redirects, while301and302allow aPOSTrequest to be redirected asGET, as described in the HTTP Semantics standard.
What does the permanent flag select?
In a vercel.json redirect rule, permanent selects the status family. The property is optional and defaults to true, so an omitted property uses the permanent response documented by Vercel. Set it to false for a temporary response.
{
"$schema": "https://openapi.vercel.sh/vercel.json",
"redirects": [
{ "source": "/me", "destination": "/profile.html", "permanent": false }
]
}
The same rule with permanent: true produces a 308 Permanent Redirect. The reference also exposes statusCode for a different redirect status, and says that this property cannot be combined with the permanent boolean. This gives a project an explicit route to 301 or 302 when that behavior is required.
Why preserve the method and body?
A redirect can carry a request with a method and content, such as an API submission. Vercel's status table describes 307 and 308 as responses where the method and body never change. The redirects page therefore recommends these codes for a public API, where changing the follow-up request to GET could send a request with different semantics to the destination.
RFC 9110 gives the protocol reason. For 307 Temporary Redirect, the user agent MUST NOT change the request method when it automatically redirects to the target URI. The standard's overview says that 307 and 308 identify method-preserving redirects, while historical behavior for 301 and 302 permits a POST to become GET.
How do temporary and permanent responses differ?
The temporary and permanent labels describe the target URI's status. RFC 9110 defines 307 as a resource that resides temporarily under another URI, so a client continues using the original target URI for future requests. It defines 308 as a resource assigned a new permanent URI, with future references expected to use one of the new URIs.
Vercel's documentation describes 307 as client-uncached and 308 as client-cached. RFC 9110 also says that a 308 response is heuristically cacheable unless the method definition or explicit cache controls indicate otherwise. The permanent choice therefore communicates both the intended lifetime of the move and a method-preserving redirect status.
How can you verify the response?
Inspect the response headers for a path and query string that exercise the rule:
curl -I 'https://your-project.vercel.app/about?ref=test'
curl -I 'https://www.example.com/about?ref=test'
For Vercel's permanent example, the documentation says to expect 308 and a Location value pointing to https://www.example.com/about?ref=test. For a rule that should remain temporary, check for 307. A POST test should also confirm that the destination receives the original method and body when the client follows the redirect.
Related terms
- How do I configure redirects in vercel.json?
- How do Vercel redirects handle query parameters?
- How do I redirect a whole URL section on Vercel?
- How can Vercel redirect only requests for a particular hostname?
FAQ
Why not use 301 or 302 for an API redirect?
RFC 9110 documents historical method changes for 301 and 302, including a POST followed as GET. Vercel recommends 307 or 308 when the original method matters.
Does permanent: true mean that Vercel returns 301?
No. Vercel's configuration reference maps permanent: true to 308 and permanent: false to 307. A different status uses the separate statusCode property.
Does 308 mean that the response is cached forever?
No. RFC 9110 calls 308 heuristically cacheable and allows explicit cache controls or method definitions to affect caching.
Sources
- Vercel, "Redirects", 18 September 2026
- Vercel, "Configuration Redirects", 11 August 2026
- Vercel, "Static Configuration with vercel.json", 14 August 2026
- IETF, "HTTP Semantics", June 2022
Check how a page reads to answer engines. Open the GEO score analyzer