I can't visit websites that have “.dev” domain

14

4

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?

pawelmadeja

Posted 2019-03-12T13:45:11.237

Reputation: 793

2Which 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?) – user1686 – 2019-03-12T13:47:16.193

do either of the following work? dig get.dev and dig +trace get.dev - if they fail, what's the output? – Attie – 2019-03-12T13:48:49.990

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: https://pastebin.com/74NnEcFr And for dig +trace get.dev: https://pastebin.com/G3WDGHZM

– pawelmadeja – 2019-03-12T14:12:48.737

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 – 2019-03-12T14:19:39.513

Possible duplicate of How to stop an automatic redirect from “http://” to “https://” in Chrome

– Burgi – 2019-03-12T14:22:33.070

You really shouldn't be using using .dev on your local machine

  • Yeah, I know, I don't want to :) I just would like visit publicly available websites, that have ".dev" top level domain
  • < – pawelmadeja – 2019-03-12T14:56:08.887

@user2929594 the output from dig that you've shared implies the DNS lookup is successful... is this still an issue? – Attie – 2019-03-12T15:53:37.040

Answers

54

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

pawelmadeja

Posted 2019-03-12T13:45:11.237

Reputation: 793

2Awesome thanks. I found an old dev tool had created this entry # Lovingly generated by Pow – kross – 2019-08-07T02:13:27.357

1@kross Pow strikes again - same problem for me as well. I learned about resolvers today as well. – Tim G – 2019-09-17T17:05:40.303

1It works. I just renamed dev to dev.bak in case I need to see its contents again. – Robert Stevens – 2019-12-06T23:00:35.053

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.

Gabe

Posted 2019-03-12T13:45:11.237

Reputation: 1 837