1

Develop > Empty caches (cmd alt e) isn't clearing Safari's DNS cache.

I made some changes to /etc/hosts and those changes are reflected in all my other browsers, and ping and getent hosts, but Safari still loads the previous website.

I have also tried sudo killall -HUP mDNSResponder and sudo dscacheutil --flushcache and neither help Safari forget the previous address.

1
  • just try restarting Commented Aug 30, 2023 at 4:38

1 Answer 1

0

First thing to do is isolate your browser from search engines.

Next you might need to check for VPN like iCloud Private Relay. There are a handful questions here with some variations on the theme of blocking hosts via file overrides and when it’s time for a reboot after testing.

I like to test this with a text file. You can quit the browser and use commands like

nslookup this.web.site
open http://this.web.site 
nslookup apple.stackexchange.com
open https://apple.stackexchange.com/q/436458/5472

And then retest flushing the dns cache to determine if you are getting a DNS lookup or a web search engine lookup or it’s just using history or cached / pinned / history of previous web site data to jump start things.

3
  • I don't understand, what should I do? What does it mean "isolate browser from search engines" The issue exists on VPN and not on VPN.
    – minseong
    Commented Feb 5, 2022 at 22:10
  • Isolate means to make the changes in the answer I linked - all of them. Then to retest one specific address. What site can’t you block @theonlygusti ? Did you turn off all VPN and private relay as well?
    – bmike
    Commented Feb 5, 2022 at 22:36
  • Do you want help scripting the lookups? @theonlygusti
    – bmike
    Commented Apr 6, 2022 at 20:48

You must log in to answer this question.

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