How do I change the status code of http redirection to https from 308 to 301? #3972
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hi @ksnyder, Vercel will always forward HTTP traffic to HTTPS with a The main reason for this is that the client must repeat the same request method ( An excerpt from the RFC 7238:
|
Beta Was this translation helpful? Give feedback.
Hi @ksnyder,
Vercel will always forward HTTP traffic to HTTPS with a
308status code (see our documentation).It's not possible to change the status code to
301in this case.The main reason for this is that the client must repeat the same request method (
GET,POST) on the target location when redirecting with a308status code, whereas this is not necessarily the case for a301status code (for this status code it's allowed to change the request method fromPOSTtoGET). This may lead to unintended behavior, which is prevented by using the308status code.An excerpt from the RFC 7238: