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

How often does a browser need to perform a DNS lookup for the same site?

share|improve this question
up vote 6 down vote accepted

DNS is (meant to be) cached until the TTL (Time to Live) on the DNS record expires. The TTL starts counting down from when the DNS record is retrieved.

So, if you have a TTL of 5 minutes, then if it's been more than 5 minutes since the DNS record has been retrieved, then it will be re-retrieved.

However - this is only how well behaved DNS services work. There are some not-so-well behaved DNS services that will cache a record for a lot longer than the TTL, which has caused a lot of problems for webmasters in the past (there's lots of questions on this site about it).

share|improve this answer
thanks Farseeker - however are you implying that the browser (e.g. firefox say) will do this caching itself? So if I have a site in firefox and keep hitting refresh, is firefox actually issuing a DNS call each time, which may be then picked up at the windows level by the local Windows DNS cache which then does the cache check? – GregH Aug 17 '10 at 7:03
Yes, normally the browser will perform a fresh lookup for every page refresh. As the records are cached, this isn't expensive. – wolfgangsz Aug 17 '10 at 8:49
Further to that, if you have the command dig available, you can run it on the domain in question and watch the TTL go down. – vmfarms Aug 17 '10 at 14:47
@Greg - wolfgangsz and vmfarms have got it right. Additionally if you're on Windows, try nslookup instead of dig. – Mark Henderson Aug 17 '10 at 21:11

browser may perform DNS lookups on every request but all they are cached, on windows - with DNS Client service, on Mac - with mDNSResponder daemon. Anyway even if you don't have any local DNS cache, the DNS server you use will cache a record. The record is being resolved again from the website domain's DNS servers as soon as it's TTL expires.

share|improve this answer
thanks disserman - one thing that doesn't make sense to me however is, when I monitor for outgoing DNS calls using wireshark, if I actually issue a "ipconfig /flushdns" and then refresh the page, I do not see a new DNS request being issued from the PC. Doesn't that imply that the browser must not issue a DNS request each time then? – GregH Aug 17 '10 at 7:08
what DNS servers your PC is using? btw try restarting "DNS Client" instead of flushing dns with ipconfig – disserman Aug 18 '10 at 11:18

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.