6

I'm trying to visit websites like https://get.dev, but instead of loading website, there appears "Resolving host" message and then I'm getting "This site can’t be reached get.dev’s server IP address could not be found. DNS_PROBE_FINISHED_NXDOMAIN".

Here's what so far I have done:

  1. I've tried visit websites from different browsers (Chrome, Safari, Firefox) - but with no luck. So it's not duplicate to How to stop an automatic redirect from “http://” to “https://” in Chrome
  2. My hosts configuration is pretty default:
 127.0.0.1       localhost
 255.255.255.255 broadcasthost
 ::1 localhost
 fe80::1%lo0     localhost
  1. I had got installed Laravel Valet before, but I removed it and uninstalled dnsmasq (brew uninstall dnsmasq). Afer I removed I've restarted my computer.
  2. I've tried also to ping those domains, but console (after some time) returns only ping: cannot resolve get.dev: Unknown host
  3. It's possible to visit ".dev" websites from other computers in the same wi-fi network.

I'm wondering what else I can do to debug it and make it work?

  • 2
    Which DNS servers are you using on your computer? (If the OS is configured to use dnsmasq, which servers is dnsmasq using – and is 'dev' mentioned anywhere in dnsmasq's config?) – grawity Mar 12 at 13:47
  • do either of the following work? dig get.dev and dig +trace get.dev - if they fail, what's the output? – Attie Mar 12 at 13:48
  • I'm using Cloudflare DNS (1.1.1.1). I've stopped and uninstalled dnsmasq using homebrew. I've checked also some old dnsmasq's config and searching "dev" returned 0 results. For dig get.dev I'm getting: pastebin.com/74NnEcFr And for dig +trace get.dev: pastebin.com/G3WDGHZM – pawelmadeja Mar 12 at 14:12
  • 2
    You really shouldn't be using using .dev on your local machine. These are fully qualified TLDs now. You should swap to using .localhost as outlined in the IETF documentation. – Burgi Mar 12 at 14:19
26

Ok, I figure it out:

  1. I used command scutil --dns which returned current resolvers configuration
  2. There was entry:
 resolver #8
  domain   : dev
  nameserver[0] : 127.0.0.1
  flags    : Request A records, Request AAAA records
  reach    : 0x00030002 (Reachable,Local Address,Directly Reachable Address)
  1. Then I went to the catalog /etc/resolver and I found there file called dev.
  2. I've removed that file and everything started working just fine
0

That dig works implies that your DNS client config is correct, i.e. you're actually using the cloudflare service, and it's returning the correct results.

That ping doesn't work therefore implies that it's not actually querying DNS. Your /etc/hosts file is fine (and it'd be fast - you said that ping takes a while before it fails). Run cat /etc/nsswitch.conf; the line starting with hosts: configures where ping (and your browser, and all other general tools or applications) will try to get Name-to-IP data. If it doesn't read files dns (i.e. "use /etc/hosts, and then try DNS"), there's your problem.

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.