About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
The Mac is on the office Wi-Fi. Public sites open. files does not, or the full name files.office.example does not. Those are different faults. scutil --dns shows which resolvers the Mac is using. The full name tells you whether office DNS has the host. A search domain is what gets added when someone types only the short label.
The internal name already exists. This Mac is not resolving it. A Windows PC that fails the same name because of NRPT is a different fault.
What scutil --dns is showing
--dns "reports the current DNS configuration." "The first listed resolver(5) configuration is considered to be the "default" configuration. Additional "supplemental" configurations follow. Those containing a "domain" name will be used for queries matching the specified domain. Those without will be used as a "default" configuration in addition to the first listed."
An internal name can therefore go to a supplemental resolver whose domain matches, instead of to the default resolver that answers public names. If that supplemental block is missing, or its servers do not answer, the internal name fails and the public web still works.
A search domain is separate. -setsearchdomains "Designates the search domain for the specified network service. You can list any number of search domains." Apple's networksetup guide gives this example, with its own sample service name and domains:
networksetup -setsearchdomains "Ethernet" example.com foo.com
files usually works when a search domain turns it into a name the server has, such as files.office.example. The scutil manual does not say the report prints a line labelled search domain. Save the whole report anyway. It is the picture of the resolvers.
Do not use dig +search as proof. That option "uses [or does not use] the search list defined by the searchlist or domain directive in resolv.conf, if any. The search list is not used by default." Dig is the test for a name you type in full.
scutil -r says whether an address "can be reached using the current network configuration" or "cannot." Use it after the name resolves. "Not Reachable" on a name that did not resolve is not a routing result.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| No search domain | The full name resolves; the short name does not | dig the full name |
| No supplemental resolver for the office domain | The full internal name fails; a public name works | scutil --dns |
| The server has no record | Verbose dig shows NXDOMAIN | Exit code 0 includes NXDOMAIN |
| The name resolves and the host is down | dig returns an address; scutil -r is Not Reachable |
Reachability is after DNS |
Prove the cause before changing anything
Copy the output into mac-dns-2026-11-22.txt.
1. Save the report.
scutil --dns
The first block is the default. Note any later block that contains a domain, and the servers with it.
2. Query the full name at an office server address from that report, or the address your administrator gave you.
dig @192.0.2.53 files.office.example
Run it without +short, then read its exit code with echo $?. Code 0 means "DNS response received, including NXDOMAIN status." Code 9 means "No reply from server." An address means the name exists. NXDOMAIN means this server says it does not.
3. Query a public name with no @server. If that works and step 2 is NXDOMAIN, the Mac resolves and the zone has no such host. If step 2 returns an address and the short name still fails, the missing piece may be the search domain, or a supplemental resolver for that domain; compare with the scutil --dns report.
4. If step 2 returns an address:
scutil -r 192.0.2.20
Use the address from the answer. Not Reachable means this is no longer a search-domain problem.
5. List services before you change one.
networksetup -listallnetworkservices
An asterisk means disabled. Use the Wi-Fi service name from this list, in quotes, in the commands below.
Fix
Change the search domain only when the full name exists and people type the short name.
To save the current search list first, run the command below. SS64's networksetup reference says -getsearchdomains displays "Domain Name info" for the service. Also write down the domains you are about to set.
networksetup -getsearchdomains "<Wi-Fi service name>" > search-domains-before.txt
Disruptive step: the next command replaces the search domains of that Wi-Fi service. A wrong domain makes short names resolve to unexpected hosts, or fail. Drives and printers opened by a short name all move together.
networksetup -setsearchdomains "<Wi-Fi service name>" <office domain>
Apple's sample lists two domains. You can list more than one. Apple's guide does not say which one is tried first. Keep the list to the office domains people use.
To undo it: if search-domains-before.txt lists domain names, run the same command with those domains. Neither Apple's networksetup guide nor SS64's reference prints what the getter shows when none are set; if the file lists no domain name, type empty in place of the domain name, which clears every search domain:
networksetup -setsearchdomains "<Wi-Fi service name>" empty
Run scutil --dns again and compare it with the saved report. Do not point the Mac at a public DNS server to force an internal name. If that server has no record, dig returns NXDOMAIN. When the same name must differ inside and outside the office, that is split-horizon DNS, which is a different fault.
Confirm the fix
- The short name opens in the application that failed.
- dig of the full name still returns the same address.
- A public name still resolves.
scutil -ron the address succeeds if the user must reach the host, not only name it.
What to watch afterwards
- Read
scutil --dnswith the VPN up and with it down. A supplemental configuration can take internal names even when the search domain is right. -setsearchdomainsreplaces the service's list. Apple's guide does not say it merges with a DHCP list.- A search domain completes a label. It does not create the DNS record.
Read next
Related articles you may want next.
- HostingSplit-horizon DNS so office and remote staff reach the hosted name correctlyHelp office and remote staff reach the same hosted application name. Plan internal and public DNS answers, certificate names and changes before migration.Read article
- TroubleshootingVPN connected but internal names do not resolve: read the NRPT and the interface orderAlways On VPN or split tunnel connected but internal names fail? Read the NRPT, suffix search list and interface metric on the Windows client.Read article
- TroubleshootingMac Wi-Fi says connected, but there is no internet: check the gateway and DNSMac Wi-Fi is connected and websites fail. Read the DHCP router and DNS options, test them with scutil and dig, then change settings with a saved copy.Read article
Risks and limits
- The scutil manual is dated 23 January 2008. It documents
--dnsand-r.-setsearchdomainsis in Apple's networksetup guide. - Apple's networksetup guide documents no command that prints the current search domains. SS64's reference lists
-getsearchdomainsfor that. - dig does not use the Mac search list unless resolv.conf says so, and
+searchis off by default.
Sources
- scutil(8) — Apple, source file at tag configd-963.50.8, man page date 23 January 2008, accessed 22 November 2026
- About networksetup in Remote Desktop — Apple, no date shown, accessed 22 November 2026
- networksetup command reference — SS64, no date shown, accessed 22 November 2026
- BIND 9 manual pages: dig — ISC, version 9.20.9, no date shown, accessed 22 November 2026
This article was originally published on .