Can't get to google.com on Safari or Chrome - SOLVED

Thanks to Jeff Fischer for asking about the /etc/hosts file - turns out that google was listed in the etc/hosts file thereby blocking it.

Macbook pro 15.6.1 can’t get to Google.com on either Safari or Chrome.

Can get to other google properties (mail, calendar, etc.) but when try to go to google.com (or do search through address bar) in Safari it just never loads and in Chrome it gives the page saying it isn’t safe to proceed but even if I say proceed, it still won’t load google.com

Other Macs on same wi-fi network have no problem getting to google.com. I checked network settings for weird DNS or proxies and didn’t find any. I tried incognito window. I checked for bad extensions, malware, etc. Couldn’t find anything.

Help!

It’s working for me, so if it is/was a problem on Google’s server, it’s been fixed.

Assuming it wasn’t something transient (please try again, after clearing your browser cache), I would check:

  • Network settings.
    • Is a proxy configured?
    • A network profile?
    • An unexpected setting (IP address, DNS, etc.?)
  • Content blocking software
    • Any ad blocker?
    • Anti-malware scanner

If you use a content blocker, see if you can temporarily disable it. If that works, see if there’s an available update to the software or its data files.

I know the problem is NOT on google’s end because other macbooks on same wi-fi network can connect without issue.

I cleaned out browser cache and it didn’t help. I also tried incognito windows and that didn’t help.

I checked for Proxy, weird DNS, etc. but didn’t see anything.

No ad blockers or any browser extensions. Did a malwarebytes anti-malware scan - didn’t help.

However, I haven’t thought Network Profile. Is that still a thing in Sequoia?

From my four decades in IT, it’s ALWAYS a DNS problem. May not be fixable by you (change your connection’s default DNS settings) but it’s ALWAYS DNS.

We used to have this framed on the wall when we had a physical office.

3 Likes

OK. Any concrete ideas on how to fix?

DNS tried router IP (192.168.4.1) Google (8.8.8.8) and Comcast ISP (75.75.75.75)

Same DNS as non-problematic laptops on same network

It is. Here’s Apple’s document:

But since you sound surprised, it’s unlikely you have one installed (unless this is a managed device and your IT department installed it).

… and even if the settings are correct, your cache may be poisoned. If there was a temporary glitch (whether deliberate or accidental) with Google’s DNS, your computer may have downloaded the corrupt entry. DNS entries typically time-out after 8-24 hours, but a bad entry can cause problems until then.

I found this article, which describes how to force-clear that cache:

Try these two commands (from a Terminal):

sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder

The first command clears the Directory Service cache. The second restarts the mDNSResponder service (multicast DNS, used for Bonjour name resolution).

1 Like

Thanks. I’ll check the profile section of settings to confirm it is empty and I’ll try super flush on cache.

Is it possible you have an entry for google in your /etc/hosts file?

Agree with @TonyTownsend
Try the command
nslookup google.com
on this mac and the one that works. This will tell you which DNS server your mac uses and the IP it will be told to use.

1 Like

Tried this but it didn’t make any difference.

Talking about [How to Clear DNS Cache on macOS]

Will give the nslookup command a shot. thanks.

1 Like

Not a techie here at all so consider the following as possibly naive but — have you completely shut down the Mac, unplugged everything, including peripherals, and restarted with nothing attached except as needed to connect to internet? Have you tried via a hotspot instead of router? Safe mode?

Do you have anything like Little Snitch installed? Is it possible you accidentally denied access to google.com?

I’d also try going to Google in incognito/private mode and/or trying yet another browser (maybe Firefox).

1 Like

Nothing like Little Snitch installed.

I tried using multiple browsers and incognito / private mode but that didn’t help.

I’m waiting to get access to the computer again to check the nslookup and the hosts files ideas that were floated…

WINNER!!

Turns out that the etc/hosts file did have google in there. I removed it and the problem was no more.

Thank you!

2 Likes

As we see, it’s true so often that it truly is funny.

1 Like

Glad that worked for you. The only reason I suggested it was because I did the same thing once many moons ago.