macOS – Fix HTTP URLs Not Working on OS X Yosemite

certificategoogle-chromehttpmacosNetwork

My OS X Yosemite 10.10.5 Mac seems to only be able to hit HTTPS URLs, but not HTTP URLs. I tested another computer on my network, and that machine seems to work fine.

I tested using this URL:
http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js

In Chrome, the URL returns ERR_EMPTY_RESPONSE. Safari and Firefox return similar errors.

With curl, curl -4 http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js works fine, but when I do either of these…

curl -6 http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js
curl http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js

…I get:

curl: (52) Empty reply from server

I changed my DNS to 8.8.8.8 and 8.8.8.4 to use Google's DNS instead, and flushed my DNS cache using sudo dscacheutil -flushcache;sudo killall -HUP mDNSResponder; and restarted the machine, but it still ends up with the same issue. It also fails on other sites that use HTTP, such as http://yahoo.com.

If I change HTTP to HTTPS on any of the above URL's, it works fine.

Best Answer

I've experienced the same behavior twice, Once with Time Warner and again with Comcast Xfinity. Browsing to HTTPS is fine, HTTP is empty response.

In both cases I contacted the ISP and they resolved it. It's possible some site tripped an upstream alarm.

See here for similiar experience