Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 4 down vote accepted

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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