Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Regarding DNS records, how do I setup one domain, www.example.com, which has HTTP for www on and HTTPS for www on

For clarity:

  • HTTP www.example.com resolves to
  • HTTPS www.example.com resolves to

Currently I have:

@   IN A
www IN A

My current (average) knowledge of DNS records is suggesting that I'm not going to be able to set it up that way. Instead I'll have to create a new a-record to something like secure IN A

Note: Setting HTTPS www.example.com on is not an option, unfortunately.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

I'm afraid you cannot do what you are asking directly unless you want HTTPS traffic to go to e.g. secure.example.com instead of www.example.com.

The only solution would be to put a proxy/firewall/load balancer device in front of your webservers that forwarded on traffic to the different IP addresses based on the protocol used.

share|improve this answer

There's no way to perform this with DNS, as you have to have one IP address for a given NAME, irrespective of the protocol the options available to you are:

  • Use a firewall/router to route the traffic accordingly to different servers.
  • Add a new record for, for example, secure.example.com as, configure the server hosting to redirect any HTTPS requests for www.example.com to secure.example.com
share|improve this answer
+1, thanks for the help. –  Jeff Nov 24 '11 at 17:08

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.