5

My Mac (Mojave 10.14) is unable to access any website with a .dev domain name, such as get.dev. I tried running $ ping get.dev and got the following output:

PING get.dev (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.044 ms
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.161 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.070 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.166 ms
64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.189 ms
64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.056 ms
^C
--- get.dev ping statistics ---
6 packets transmitted, 6 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.044/0.114/0.189/0.059 ms

I know it's been popular to remap .dev to localhost, and thought I might have done that at some point in the past and forgot about it. However, when I run $ cat /etc/hosts:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost

I'm not sure where to continue troubleshooting this. Are there any other hosts files that might add additional entries?

EDIT: My DNS is set up to use 1.1.1.1, according to their instructions.

EDIT: More troubleshooting below.

$ dig get.dev:

; <<>> DiG 9.10.6 <<>> get.dev
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58743
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;get.dev.           IN  A

;; ANSWER SECTION:
get.dev.        300 IN  A   216.239.32.29

;; Query time: 44 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Wed May 15 14:35:46 CEST 2019
;; MSG SIZE  rcvd: 52

curl -v get.dev:

* Rebuilt URL to: get.dev/
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connection failed
* connect to 127.0.0.1 port 80 failed: Connection refused
* Failed to connect to get.dev port 80: Connection refused
* Closing connection 0
curl: (7) Failed to connect to get.dev port 80: Connection refused

Why would curl try 127.0.0.1 when dig returns 216.239.32.29?

12
  • 1
    Have you tried to clear your DNS cache? May 8, 2019 at 13:31
  • 2
    Maybe your upstream DNS server serves you the wrong IP?
    – mtak
    May 8, 2019 at 13:40
  • 1
    output of dig get.dev? May 10, 2019 at 20:33
  • 2
    Hey, try this: dig @1.1.1.1 get.dev versus dig get.dev. See if you get different results.
    – boxmein
    May 11, 2019 at 22:37
  • 1
    You know it's resolving how it should be if you use dig and a specific nameserver. So the issue is likely on your machine, network or your ISP. Do other machines on your network (e.g. a phone connected to your WLAN) show the same symptoms? Did you verify that your configuration was changed to use 1.1.1.1 and not e.g. a DHCP supplied nameserver?
    – Seth
    May 15, 2019 at 12:53

1 Answer 1

6
+150

run scutil --dns and check if you found something like:

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)

if is this case you can run rm -f /etc/resolver/dev to remove it

1

You must log in to answer this question.

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