WP HTTP Error: Couldn't resolve host

Sasha asked:

I keep getting this kind of error in my WP dashboard:

WP HTTP Error: Couldn't resolve host

I tend to believe it’s a DNS issue although all was working OK before.
What I have done is altering the /etc/hosts file and adding stuff like:               localhost.localdomain localhost          zako.vladoiu.net zako api.wordpress.org jetpack.wordpress.com downloads.wordpress.org jetpack.wordpress.org rest.akismet.com rest.akismet.com rest.akismet.com rest.akismet.com smtp.gmail.com dashboard.wordpress.com blogsearch.google.com
173.194.*.* google.com

While this fixes the error say :

WP HTTP Error: Couldn't resolve host 'rest.akismet.com'

My answer:

Put valid DNS server entries into /etc/resolv.conf.

It should look something like this:

nameserver 2001:db8:24fe:381::37

The actual values will be supplied by your ISP, hosting provider or datacenter. Or you can use public DNS providers such as Google Public DNS.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.