42

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?

CC BY-SA 4.0
7

2 Answers 2

123

Ok, I figured 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
CC BY-SA 4.0
8
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.

CC BY-SA 4.0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .