I'm facing a little question here. I have a long /etc/hosts
file. (working in the web, so I'm hosting a lot of sites locally for developping). Let's says it is about 40, 50 lines long.
All redirecting to 127.0.0.1.
Now when checking Chrome's inspector, it seems my local web pages are loading slowly because of the DNS Lookup part. On a mygreatwebsite.local
url also defined in the /etc/hosts
file.
After a quick check, it would seem that reducing the hosts
file to a couple of lines, drastically speeds up the DNS lookup part. So my question, is it possible to be confronted with differences of about 5 seconds for 50 lines, and insignificant times for a couple of lines? Or am I completely missing something?
Best Answer
Your tld .local could be the problem, zeroconf uses this. There is no real standard, but the suggested tld for an internal tld is .site or .internal. See http://en.wikipedia.org/wiki/Top-level_domain#Pseudo-domains for this.