Forums

Force https with 301 instead of 302

I've set the force https from the application dashboard, but it seems like this redirect is 302 by default.

Is there any way to turn it into 301? Here's an example https://prnt.sc/10n8ui5

It's set to a 302 because if we did a 301, if you switched it on it would be really hard to switch it off again because browsers would all have cached the redirect. Is there a particular reason why you're keen on having a 301 instead?

hey, thanks for the prompt response. essentially the SEO would be the reason and I would rather have it as a permanent instead of a temporary redirect - is it possible to switch it on a case-by-case basis? from what i understand browser no longer cache the redirects indefinitely and i don't see a reason why i would want the http to be available any time in the future

We don't have that built in, but perhaps you could use the HTTPS redirection built into your web framework? For example, here's how to do it with Django, and with Flask you can use this plugin.