I have a flimsy grasp of DNS. Nonetheless, in order to install a local development copy of Wordpress MU, I needed to create a fake domain, which I called local.dev. It and all subdomains simply resolve to Apache then directs to the correct folder.

I installed PowerDNS, and got it working properly with a MySQL backend. I didn't feel comfortable, but since it worked, I didn't ask any more questions. The bizarre thing is it requires an internet connection to resolve correctly, and now I need to use it offline.

If I am offline, Chrome provies the error:

Error 105 (net::ERR_NAME_NOT_RESOLVED): The server could not be found.

/etc/hosts localhost



When I dig, I get the same thing, on or offline:

dig local.dev

; <<>> DiG 9.6.1-P2 <<>> local.dev
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10635
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;local.dev.         IN  A

local.dev.      120 IN  A

;; Query time: 0 msec
;; WHEN: Thu Apr 22 15:32:51 2010
;; MSG SIZE  rcvd: 43

nslookup doesn't find local.dev in either case

nslookup local.dev
;; Got recursion not available from, trying next server
;; Got recursion not available from, trying next server

** server can't find local.dev: NXDOMAIN

PowerDNS config (comments removed):


If you need more information, I am happy to provide it.


It sounds like you either need an local hosts entry for your DNS server, or your PowerDNS is set to resolve addresses externally before checking its internal database.

  • This sounds promising. I don't understand what you mean by the first possibility, and I do not know how to check the later. Any more advice would be very helpful. – Fletcher Moore Apr 22 '10 at 11:35
  • I can't tell you much on how to do anything until you tell me what operating systems you are running. On Linux/Unix the local hosts entries are usually in /etc/hosts. I don't run PowerDNS but it seems a mighty large hammer for a very small nail. – kmarsh Apr 22 '10 at 13:30
  • 1
    I'm using Ubuntu 9.10. My hosts file only has\tlocalhost. My /etc/resolv.conf nameserver\nnameserver\nnameserver My understanding is should I type local.dev in the browser, first the hosts file is checked, nothing is found, then the nameservers are used in resolv.conf in order. Since mine is first, I assumed the internet would never be consulted. However, it completely failes to resolve without the internet, which makes little sense to me. PowerDNS probably is overkill. – Fletcher Moore Apr 22 '10 at 17:57
  • Is powerDns running on the system with in /etc/hosts, is that where you are running Chrome, and is PowerDNS OK with serving or is it restricted to your netmask? Most applications follow /etc/nsswitch.conf for order of checking. (nslookup does not) Either "files" or "dns" (or ldap, nis, etc) could be first. – kmarsh Apr 22 '10 at 18:20
  • BTW local.dev won't necessarily resolve to the localhost entry in /etc/hosts. – kmarsh Apr 22 '10 at 18:21

Forget PowerDNS. Just add the necessary entries to your hosts file. Something like this: local.dev

If you have a small-ish number of subdomains, this is much more simple than trying to maintain a DNS service.

  • Unfortunately, I need wildcard subdomains. – Fletcher Moore Apr 21 '10 at 18:41

I just noticed this happening for we as well. I have host entries for several projects (~30) on which I am working. E.G.: localhost.example.com localhost.mydomain.com localhost.some-other-project.net

...and so on.

When I am not connected to a network I cannot resolve these names in Google Chrome. Works fine in Firefox and Lynx. I can ping localhost.example.com just fine. It seems that it is Google Chrome's HostResolver that is refusing to use the hosts file.

I am using Gogole Chrome 5.0.357.53 on Ubuntu 10.04. (But a quick Google search suggests that this is happening in Windows as well)

Follow these steps to reproduce (required webserver running on localhost and responding to "localhost.example.com"):

  • Add hosts file entry for: localhost.example.com
  • Disconnect form network (unplug newtork cables, turn off wireless
    radio, etc)
  • Open Google Chrome
  • Go to: chrome://net-internals/hostresolver.trace
  • Click "Enable tracing"
  • Open new tab to localhost.example.com to see this error:


Error 105 (net::ERR_NAME_NOT_RESOLVED): The server could not be found.
  • Reload chrome://net-internals/hostresolver.trace tab. Shows:


t=2085005:  "Received request r608 for {hostname='localhost.example.com', port=80, priority=1, speculative=1, address_family=0, allow_cached=1, referrer=''}"
t=2085005:  "Created job j325 for {hostname='localhost.example.com', address_family=1}"
t=2085005:  "Attached request r608 to job j325"
t=2085005:  "Starting job j325"
t=2085005:  "[resolver thread] Running job j325"
t=2085006:  "[resolver thread] Completed job j325"
t=2085006:  "Completing job j325 (took 0 milliseconds)"
t=2085006:  "Finished request r608 with error=-105"
t=2085207:  "Received request r609 for {hostname='clients1.google.com', port=80, priority=3, speculative=0, address_family=0, allow_cached=1, referrer=''}"
t=2085207:  "Created job j326 for {hostname='clients1.google.com', address_family=1}"
t=2085207:  "Attached request r609 to job j326"
t=2085207:  "Starting job j326"
t=2085207:  "[resolver thread] Running job j326"
t=2085207:  "[resolver thread] Completed job j326"
t=2085207:  "Completing job j326 (took 0 milliseconds)"
t=2085207:  "Finished request r609 with error=-105"
t=2085869:  "Received request r610 for {hostname='localhost.example.com', port=80, priority=0, speculative=0, address_family=0, allow_cached=1, referrer=''}"
t=2085869:  "Finished request r610 with error=-105"
t=2085889:  "Received request r611 for {hostname='linkhelp.clients.google.com', port=80, priority=2, speculative=0, address_family=0, allow_cached=1, referrer=''}"
t=2085889:  "Created job j327 for {hostname='linkhelp.clients.google.com', address_family=1}"
t=2085889:  "Attached request r611 to job j327"
t=2085889:  "Starting job j327"
t=2085889:  "[resolver thread] Running job j327"
t=2085889:  "[resolver thread] Completed job j327"
t=2085889:  "Completing job j327 (took 0 milliseconds)"
t=2085889:  "Finished request r611 with error=-105

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.