2

If I send a request to a local domain such as mydomain.test in Postman, it works just fine. Pinging the domain or contacting using CURL from the console gets a response as well.

curl -X GET 'https://mydomain.test'

Safari likewise works loading the custom local domain pages just fine.

If I try to access the domain in the latest Chrome or Brave browsers by going to https://mydomain.test then I get This site can’t be reached DNS_PROBE_FINISHED_NXDOMAIN.

I tried going to chrome://net-internals/#dns and clearing the cache, but this doesn't fix DNS resolution for .test domains. I get this error when I run the Lookup on that page after clearing cache:

An error occurred while resolving "mydomain.test" (net::ERR_NAME_NOT_RESOLVED).

I'm using DnsMasq to manage my local domains through Laravel Valet.

Why aren't Chrome and Brave able to access these local domains but I can access them fine in anything else?

2
  • I would check both browsers to see if you’ve got DNS over HTTPS enabled (DoH)/. If you do, it’s sending DNS requests out to a secure server that is unfamiliar with your .test domain.
    – Allan
    Commented Apr 17, 2023 at 18:43
  • That was the issue. If I turn off Use secure DNS in Chrome, then the .test domains load. After that, I found I can turn it back on and it still loads suggesting the test domains are now in Chrome's DNS cache. If you add an answer, I'll mark it as correct. Commented Apr 17, 2023 at 18:54

1 Answer 1

1

The issue is most likely DNS-over-HTTPS (DoH).

What is happening is the browser is contacting the secure DNS server configured in each browser for the DNS query but those servers aren’t familiar with your local .test domain, thus the error.

Simply disable DoH in the browser and you should be able to resolve names on your local domain as expected. You might want to create a new/different profile for dev/testing work with DoH off and a “production” profile with it on for normal browsing.

1
  • Good advice on the separate profiles. Commented Apr 17, 2023 at 19:29

You must log in to answer this question.

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