Thursday, August 1, 2019

Safari Won’t Load Google Sites

All week, Safari on my MacBook Pro hasn’t been able to access any Google sites. I first noticed the problem when using public Wi-Fi, but it persisted after I got back to my home network. Firefox and Google Chrome load the pages fine, as do third-party apps that use WebKit. And Safari on the same Mac works when it’s booted from a different macOS installation.

So, either this is a really weird bug, or something is messed up with my system. What’s odd is that the error is so generic:

Safari Can’t Connect to the Server

Safari can’t open the page “https://www.google.com” because Safari can’t connect to the server “www.google.com”.

so it’s not clear what the problem is, or even where to look. There’s no lock icon reporting a certificate problem, and the error does not even mention secure connections. Console only mentions error code -1004 (NSURLErrorCannotConnectToHost).

I don’t have any custom DNS settings, and I’ve tried resetting Safari’s cache and other files, as well as other voodoo like restarting and creating a new network location in System Preferences.

Previously:

21 Comments RSS · Twitter

Does it work if you open and use a private browsing window? Or same computer but logged in to a different user? Struggling with a similar-sounding issue where Chrome suddenly has refused to connect to a corporate web site of a client.

@BruceB Does not work in a private window, does work in another user account.

Do you have a VPN or Little Snitch installed? I find that those things will occasionally give me really weird "can't connect" errors for a specific domain, even though everything else seems to load fine. But restarting my Mac always fixes it.

If you try to access googlemail.com, do you get redirected to google.com and then it fails? Or no redirect at all?

What about other google-owned sites like android.com or nest.com?

Sören Nils Kuklau

@ Michael does the output of dscacheutil -q host -a name www.google.com differ from host www.google.com?

If so, try dscacheutil -flushcache.

I have similar problem especially when I have many tabs opened ( in the hundreds ), some domain simply would not load with similar error messages like yours until I do a restart. ( Closing Safari and reopen it would not work )

@Ben No VPN. I do have Little Snitch, but it’s set to allow everything for Safari. googleemail.com fails. android.com and nest.com work.

@Sören Yes, those return different IPv4 addresses until after I reset the cache.

It may be a coincidence, but last night, I suddenly found that Safari 12.1.2 couldn't connect to Youtube or twitter, but it was fine connecting to other sites, including google and gmail. There were no problems connecting to Youtube and twitter with other browsers at the same time on the same machine. I shut down the machine, and it is working normally this morning.

@stu Well, I did the 10.14.6 supplemental update and now it works. I’m guessing it was probably not due to the code in the update, but maybe something got reset during the installation process that didn’t under a normal reboot.

Dimitri Bouniol

You can always try connecting using nscurl from the command line to test the same URL fetching mechanism that Foundation/WebKit uses under the hood, and it might output more useful details.

I was having the same issue with YouTube and Gmail. I had Google DNS (8.8.8.8 and 8.8.4.4) set up (which had been working well for years). I removed the DNS settings, and now I can sign into YouTube and Gmail with zero issues. Posting this in case it helps someone else.

I can't connect to my companies Office 365. Now all internal sites uses the Office 365 login which makes Safari useless. Instead of a legitimate login page I come to a gray empty site with a small login window. Any attempts at logging in fails. I can't even install OneDrive because to log in it opens some kind of small Safari web page. Naturally, both Firefox and Chrome works perfect.

Just came here to thank @Sören Nils Kuklau for his comment above as this fixed this issue for me with Safari. Thanks @Soren!

Let me add that later the problem reappeared, but pausing LittleSnitch, loading the site, e.g., youtube, and then restarting LittleSnitch network filter worked.

I have Sierra OS 10.12. It loaded google maps fine until today. I cleared history and cache. Does not work anymore.

Any suggestions? Very odd. Joe

Richard Kalina

Hi There,

I have the same issue, MacBook pro 2015 ! I get a greyed out error message in the centre of a blank page on safari saying " A Problem repeatedly occurred with "https://www.google.com/maps" HELP I need maps for work!! ANYONE ????

Richard Kalina

CAN'T Load the Comments RSS feed either!

Richard Kalina

Works on Firefox, but not on Safari??

LITTLE Snitch - the little fucker was the problem with my safari not connecting to gmail. Took me a week to find out.

FWIW Snitch turned out to be the cause for me too. Thanks! It was a specific time that I denied a request to connect to something specific at google, [suspicious_term].google.com, but the rule I generated locked out the whole domain. As soon as I deleted that, everything back to normal. Sorry I didn't jot down the specific address.

I have this problem only with my Apple Desktop, no problem with my iPad or cell phone. When I click on Goggle, the message says can't connect to google.com. I hit reload over and over and finally it connects. What can I do to fix this?

I meant it says "safari can't connect to google.com."

Leave a Comment