views:

230

answers:

4

If I was to send a URL to a DNS server, lets say: "dev.example.com/?username=daniel", what is exactly sent to the DNS server? The whole URL (including any passed parameters) or is it just website section "dev.example.com"? I want to know so that I know what parameters I should be hiding in a URL.

The reason I am asking is because I just don't want confidential information sent to DNS servers. I am using https for all URLs but when someone asks to go to a URL, I want all parameter information from the URLs to be hidden from all DNS servers. I just am not sure what is sent to a DNS server to establish an SSL connection. Since I have a site that needs just about every parameter encrypted I am concerned about how to hide this information if DNS reads it.

+1  A: 

DNS is agnostic of protocol. The value sent is just the hostname, so in this case dev.example.com.

I'm also not sure what this has to do with "parameter hiding" but if you could expand on that we might be able to provide more helpful advice.

Edit (based on your update): Ah. Well then you shoud be good to go, as only the domain name itself is sent.

Sean Bright
+2  A: 

The Domain Name System (DNS) resolves hostnames to IP addresses, so only the value of the hostname is sent.

f3lix
A: 

If the DNS server happens to be a web server which root web application happens to answer to the "username" query, then you might get something back. Other than that, DNS is another kind of animal.

Otávio Décio
So you think he mixed up HTTP and DNS ... ?
f3lix
Look, it is possible that a DNS server is also a Web server. I'm pretty sure he mixed things up but I'm just sticking to the question. So, if there is a socket listening on port 80 the server (DNS or otherwise) will receive ?username=daniel along with the http headers...
Otávio Décio
+3  A: 

dev.example.com may be resolved (if it is not already in the local cache) by sending it to your DNS server (which will almost certainly refer to another DNS Server).

Only the "dev.example.com" is sent, the rest will be passed only to the resolved IP number as an HTTP request.

So, you do not need to hide any parameters, except of course that these parameters could well end up on another website if a user visits it from your page (as a referer). If these parameters are really sensitive encode them or (ab)use POST,

Richard Harrison