Valet: certain domain name exceptions

Created on 14 Feb 2020  路  3Comments  路  Source: laravel/valet

I am using Valet with .app as the TLD, is there a way to ignore certain domains so they'll resolve to the appropriate outside DNS?

For example mailcoach.app does not work since Valet takes over.

Thank You.

Most helpful comment

If you're using Valet 2.6.0 or newer, you can add a special dnsmasq config file that will give you this sort of control.

From your post it looks like you've already run valet tld app to serve *.app locally.

Next, create the following file, and then run valet restart dnsmasq:
~/.config/valet/dnsmasq.d/passthru-domains.conf

# This configuration can be used to allow fallback DNS lookups to public servers
# This is particularly useful if you don't specify fallback servers in MacOS config

# Uncomment to set the public fallback servers to Cloudflare:
#server=1.1.1.1
#server=1.0.0.1


#### Special overrides per-domain which should fallback to public if not found locally
## syntax:  server=/domain.tld/#  (where the /# is what means to use public fallback)
server=/mailcoach.app/#

All 3 comments

If you're using Valet 2.6.0 or newer, you can add a special dnsmasq config file that will give you this sort of control.

From your post it looks like you've already run valet tld app to serve *.app locally.

Next, create the following file, and then run valet restart dnsmasq:
~/.config/valet/dnsmasq.d/passthru-domains.conf

# This configuration can be used to allow fallback DNS lookups to public servers
# This is particularly useful if you don't specify fallback servers in MacOS config

# Uncomment to set the public fallback servers to Cloudflare:
#server=1.1.1.1
#server=1.0.0.1


#### Special overrides per-domain which should fallback to public if not found locally
## syntax:  server=/domain.tld/#  (where the /# is what means to use public fallback)
server=/mailcoach.app/#

@drbyte Thank You. That worked perfectly.

I had to create the file here : /usr/local/etc/dnsmasq.d/passthru-domains.conf

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Alshie picture Alshie  路  4Comments

dannygsmith picture dannygsmith  路  5Comments

webartistse picture webartistse  路  4Comments

eberkund picture eberkund  路  4Comments

tommytompkins picture tommytompkins  路  4Comments