macOS 26 Tahoe: Flush DNS Cache Command (2026)
Flush DNS cache on macOS 26 Tahoe with the exact Terminal command, verification steps, browser cache checks, and hosts file troubleshooting.
Locahl Team
Table of Contents
- How to flush DNS cache on macOS Tahoe
- When to flush DNS on Tahoe
- Verify the resolved IP
- Tahoe hosts file checklist
- Tahoe-specific notes for developers
- System DNS cache
- Browser DNS cache
- Application cache
- VPN DNS
- Test matrix
- Common local-domain setups
- Single app
- API and frontend
- Migration preview
- Automation for frequent switching
- What to document in project READMEs
- Clear browser DNS cache too
- Automate it
- Troubleshooting
- Password does not show while typing
- "No matching processes were found"
- The wrong site still opens
- Conclusion
- Sources and further reading
Need the macOS Tahoe flush DNS command? Open Terminal and run:
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponderThis clears the local DNS cache and nudges mDNSResponder, the resolver service macOS uses for name resolution. Use it after changing /etc/hosts, switching DNS servers, testing a migration, or fixing a local domain that still points to an old IP.
How to flush DNS cache on macOS Tahoe
To flush the DNS cache on macOS Tahoe 26, open Terminal and run one command as administrator:
1. Open Terminal (Cmd + Space, type Terminal, press Enter). 2. Run sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder. 3. Type your administrator password when prompted (nothing appears as you type) and press Enter. 4. Returning to the prompt with no error means the DNS cache was cleared. 5. Verify with dscacheutil -q host -a name myproject.test.
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponderFor older macOS versions, see the complete Mac flush DNS command by version guide. On macOS 15 Sequoia, see Sequoia flush DNS guide.
When to flush DNS on Tahoe
Flush DNS when your Mac keeps resolving a hostname to the wrong address. The common developer cases are:
- You edited
/etc/hostsand the browser still opens the production site. - You changed a local domain from one project to another.
- You moved a staging site to a new server before DNS propagation.
- You changed DNS resolvers from your ISP to Cloudflare, Google DNS, NextDNS or a VPN resolver.
- You fixed a typo in the hosts file but the old result still appears.
If the hostname was loaded in a browser recently, the system flush may not be enough. Browsers keep their own host cache.
Verify the resolved IP
After flushing DNS, verify what your Mac resolves:
dscacheutil -q host -a name myproject.test
ping myproject.test
dig myproject.testUse dscacheutil to inspect macOS resolution, ping for a quick sanity check, and dig when you need DNS-server-level detail. If dig and dscacheutil disagree, check whether the hosts file or browser cache is overriding your expectation.
Tahoe hosts file checklist
If flushing DNS did not fix the problem, check the hosts file itself:
- The file path is
/etc/hosts. - Each active line starts with an IP address, then at least one space or tab, then the hostname.
- Do not include
https://, paths, ports or comments before the hostname. - Use
.testfor local development domains when possible. - Avoid
.localunless you understand Bonjour and mDNS behavior.
Example:
127.0.0.1 myproject.test
127.0.0.1 api.myproject.test
::1 myproject.testIf you need a refresher on syntax, read the /etc/hosts syntax guide.
Tahoe-specific notes for developers
macOS Tahoe keeps the same practical DNS flushing workflow used by recent macOS releases, but developers still hit problems because the stack has several caches.
System DNS cache
This is what dscacheutil and mDNSResponder handle. Flush it after hosts changes, DNS server changes and migration tests.
Browser DNS cache
Chrome and Firefox can keep their own host cache. If Terminal resolves the right IP but the browser does not, clear the browser layer.
Application cache
Some apps keep long-lived HTTP connections or internal resolver state. Restart Electron apps, database clients, API tools or browser dev servers if they keep hitting the old host.
VPN DNS
Corporate VPNs often push custom resolvers. If a local domain works off VPN and fails on VPN, check split DNS rules and proxy settings.
Test matrix
Use this matrix to isolate the problem:
dscacheutil -q host -a name myproject.test: macOS resolver.ping myproject.test: quick IP check.curl -I http://myproject.test: HTTP layer.- Chrome private window: browser state.
- Another browser: browser-specific cache.
- Phone hotspot: network-specific DNS.
If all command-line tests pass but Chrome fails, Chrome is stale. If command-line tests fail too, fix the hosts or DNS layer.
Common local-domain setups
Single app
127.0.0.1 myproject.test
::1 myproject.testAPI and frontend
127.0.0.1 app.myproject.test
127.0.0.1 api.myproject.test
::1 app.myproject.test
::1 api.myproject.testMigration preview
203.0.113.50 example.com
203.0.113.50 www.example.comRemove migration entries after the DNS change is complete.
Automation for frequent switching
If you change hosts entries every day, create a repeatable command:
alias flushdns="sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder && echo 'DNS cache flushed'"
alias checkhost="dscacheutil -q host -a name"Then:
flushdns
checkhost myproject.testFor project-heavy workflows, a visual hosts manager avoids two common mistakes: saving malformed lines and forgetting to flush DNS. Locahl also makes it easier to keep temporary migration entries separate from permanent local domains.
What to document in project READMEs
Every local project should document:
- Required local domains.
- Required ports.
- Whether HTTPS is mandatory.
- mkcert command for certificates.
- Whether Chrome DNS cache must be cleared after switching.
- Any VPN or proxy requirement.
Example:
Local app: https://app.myproject.test
Local API: https://api.myproject.test
Hosts: 127.0.0.1 app.myproject.test api.myproject.test
Certificate: mkcert app.myproject.test api.myproject.test
After hosts change: flushdnsClear browser DNS cache too
Chrome:
- Open
chrome://net-internals/#dns. - Click "Clear host cache".
- Restart Chrome if the error persists.
Firefox:
- Open
about:networking#dns. - Click "Clear DNS Cache".
Safari:
- Enable the Develop menu.
- Use Develop > Empty Caches.
- Quit and reopen Safari if the stale result stays.
For a dedicated browser walkthrough, use the Chrome DNS cache guide for Mac.
Automate it
If you switch local projects often, add an alias:
alias flushdns="sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder && echo 'DNS cache flushed'"Reload your shell:
source ~/.zshrcNow you can type:
flushdnsLocahl automates this flow for hosts file changes: edit the mapping visually, save it, and the DNS flush happens as part of the workflow.
Troubleshooting
Password does not show while typing
That is normal Terminal behavior. Type your administrator password and press Enter.
"No matching processes were found"
Restart the resolver service:
sudo launchctl kickstart -k system/com.apple.mDNSResponderThen run the flush command again.
The wrong site still opens
Work through this order:
- Re-check
/etc/hostssyntax. - Flush system DNS.
- Clear browser DNS cache.
- Disable VPN or proxy DNS temporarily.
- Test in a private browser window.
- Verify the server accepts the hostname.
Conclusion
On macOS Tahoe, DNS cache problems usually come from one of three places: stale system cache, stale browser cache, or a hosts file syntax issue. Start with the flush command, verify with dscacheutil, then clear browser DNS if needed.
Sources and further reading
- How DNS works (Cloudflare Learning)
- Terminal User Guide (Apple Support)
- The hosts file explained (Wikipedia)
Ready to simplify your workflow?
Stop wasting time with the terminal. Locahl lets you manage your hosts file in a few clicks, with automatic validation and no risk of errors.
- Intuitive visual interface
- Automatic DNS flush
- Multi-environment management
- Automatic backups
- JSON Import/Export
Reader Reviews
βThe exact Tahoe command worked first try after my hosts edit kept resolving the old IP.β
June 2, 2026
βClear, version-specific, and the verification steps with dscacheutil saved me time.β
May 30, 2026
βSolved my stale DNS issue. Would have liked a bit more on VPN split DNS.β
May 28, 2026
Frequently Asked Questions
What is the macOS Tahoe flush DNS command?
Run sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder in Terminal.
Does macOS Tahoe show a success message after flushing DNS?
No. Returning to the prompt without an error usually means the command completed.
Should I also clear Chrome DNS cache?
Yes, if the affected hostname was already loaded in Chrome. Use chrome://net-internals/#dns.
Related Articles
Flush DNS on Windows 10 & 11: ipconfig /flushdns (2026)
Flush the DNS cache on Windows 10 and 11 with ipconfig /flushdns. Step-by-step command, verification, and fixes when changes still do not apply.
Locahl Team
Developer tools team
Flush DNS on Linux: systemd-resolved & more (2026)
Flush the DNS cache on Linux with resolvectl flush-caches (systemd-resolved), plus nscd, dnsmasq and BIND. Commands by setup, with verification steps.
Locahl Team
Developer tools team
Which TLD to Use for Local Development (.test vs .localhost)
Which TLD to use for local development: prefer .test, avoid .dev and .local. Why .test is reserved, how to map it in the hosts file, and HTTPS tips.
Locahl Team
Developer tools team
Hosts File: Location, Syntax and Uses (2026)
Learn what the hosts file does, where to find it on Mac, Windows and Linux, syntax examples, local dev uses and mistakes to avoid.
Locahl Team
Edit Hosts File on Windows 11 24H2 (2026)
Windows 11 24H2 hosts file guide: Smart App Control, Controlled Folder Access, Notepad admin, PowerShell, ipconfig /flushdns and Clear-DnsClientCache.
Locahl Team