How To Fix DNS lookup failed in wordpress(err_name_not_resolved)

Published on:
Last updated:

This post is also available in: 日本語 (Japanese)

How To Fix DNS lookup failed in wordpress(err_name_not_resolved)

Problem:
Wordpress page does not appear because of the DNS lookup error happened.
It may be a problem of DNS cache because you moved the domain(change DNS settings or Name Server).

Details of the error

The error is displayed as " DNS lookup failed..." when I try to access the wordpress.
" DNS lookup failed..." have occurred in both the page and dashboard in wordpress.


At first, I thought the site itself has stopped.
However, when I look at the real-time report of GoogleAnalytics, the site has been displayed without problems.

How To Fix?

DNS records were rewritten automatically when I moved the domain(change DNS settings or Name Server).
Check in the following procedure.

1.Take time untill the DNS record changed
2.Check the DNS record
3.Clear the DNS cache on your PC
4.Restart the router of the Internet Service
5.Wait 24 hours

1.Take time untill the DNS record changed

Time-consuming to change about 2-3 weeks to changed the DNS record.
So DNS lookup failed because there is DNS cache to refer to the old DNS record.

2.Check the DNS record

I checked the DNS record with the specified domain in the following site.
As a result, it had been changed to the new name server already, I speculated the cause that the DNS cache has been leaving.

NsLookup - Query the DNS for resource records

web_001ネームサーバーの設定を調べる

web_001ネームサーバーの設定を調べる


domain:Domain you want to check
query type:NS - Name Server
By default the others, click on the "go" button.

Then, check the DNS records as follows.
Part of "time to live"(TTL) which is the time of the DNS cache remained.

web_002ネームサーバーの設定を調べる

web_002ネームサーバーの設定を調べる

3.Clear the DNS cache on your PC

Then DNS cache seems to be remained in my PC(windows), I have to clear the DNS cache.

Start a command prompt, press the enter key, and then copy and paste the contents of the following.

ipconfig /flushdns

4.Restart the router of your Internet Service

Then, I restarted the router. Just in case DNS information was remained.

5.Wait 24 hours

At the step of "2.check the DNS record", I found that the value of "time to live"(TTL) was the "1d(24 hours)".
So there is a possibility that stale DNS cache information has beed remained during the 24 hours.

So, I waited for 24 hours after changed the domain setting(change DNS settings or Name Server).

About
Kuniyoshi Takemoto is the founder of Amelt.net LLC, and editor of this blog(www.amelt.net).Learn more and follow me on LinkedIn.