Information Security Stack Exchange is a question and answer site for information security professionals. 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

I've googled around and it seems like SSL encrypts URLs. (Correct?) As I understand it, if I go to a site like then a DNS server looks at the URL, says hey, he wants to go to IP and then the packets are routed to that IP address across the Internet. But if the URL in an HTTPS message is encrypted then how can the packets be routed? If a DNS gets a request for an encrypted URL, how do they know where to send the packets?

share|improve this question
"I've googled around and it seems like SSL encrypts URLs. (Correct?)" Yes, that's correct. For more information see Is HTTPS URL in plain text at first connection?. – rugk Mar 17 at 0:43
up vote 17 down vote accepted

The DNS server does not look at the URL; the DNS server does not know what a URL could be.

The client browser extracts the intended server name from the URL. In a URL like, the server name is the part after the https:// but before the next /; i.e., in this example. The server name is what is sent to the DNS.

The DNS responds with the IP address for that server. The client then talks with that server, they do their SSL magic, and once the tunnel has been established (and only then), the client sends the URL (specifically, the part after the server name, in my example /foobar.html) to the server. And that one goes in the tunnel, hence encrypted.

This answer is a walk through the SSL protocol.

share|improve this answer
Great answer. Thanks! – bernie2436 Apr 24 '13 at 20:49

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.