301 is a permanent redirect for http.

Is there a similar code for https? I googled and found nothing. I am looking at the best way to make an NGINX redirect.

I have a solution in place, but I am trying to see if there is a better method.


The protocol is exactly the same between HTTP and HTTPS: HTTPS is HTTP encapsulated within SSL. All the request and response codes remain the same.

See Nginx redirect a particular page from https to http and use the inverse of my answer there.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.