WP HTTP Error: Couldn't resolve host

Alex 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:

127.0.0.1               localhost.localdomain localhost
188.116.55.217          zako.vladoiu.net zako
72.233.56.139 api.wordpress.org
72.233.69.6 jetpack.wordpress.com
72.233.56.138 downloads.wordpress.org
72.233.56.138 jetpack.wordpress.org
72.233.69.89 rest.akismet.com
72.233.69.88 rest.akismet.com
66.135.58.62 rest.akismet.com
66.135.58.61 rest.akismet.com
173.194.70.109 smtp.gmail.com
76.74.254.123 dashboard.wordpress.com  
173.194.65.106 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 203.0.113.187
nameserver 198.51.100.32
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 answer on Server Fault.

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