Thursday, August 1, 2019 [Tweets] [Favorites]

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:

11 Comments

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.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment