macOS Tahoe Flush DNS Cache Command
Clear DNS cache on macOS Tahoe 26 with the exact Terminal command, verification steps, browser cache checks and hosts file troubleshooting.
Locahl Team
Manage hosts files without the terminal
Locahl helps you manage environments visually on Windows, macOS, and Linux, with automatic DNS flush and backups.
One-time payment
Table of Contents
- Quick answer
- 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
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.
Quick answer
For macOS Tahoe 26, the practical command is:
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponderTerminal will ask for your administrator password. Nothing appears while you type the password. If the command finishes without an error, the system DNS cache has been refreshed.
For older macOS versions, see the complete Mac flush DNS command by version 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.
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
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
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
Flush DNS Mac: macOS Cache Command (2026)
Copy the exact macOS flush DNS cache command for Tahoe, Sequoia, Sonoma, Ventura and older versions. Includes browser cache fixes.
Locahl Team
Clear Chrome DNS Cache on Mac Fast
Clear Chrome DNS cache on Mac with chrome://net-internals, flush macOS DNS, restart sockets and fix stale local domains after hosts changes.
Locahl Team
Developer tools team
Using Hosts Files for Docker Development on Mac
Configure hosts files for Docker, docker-compose and container networking. Map services to local domains and simplify Mac development.
Locahl Team
Hosts Files for QA and Staging Testing
Guide for QA teams testing staging environments before DNS propagation, with hosts file workflows and team collaboration tips.
Locahl Team