How to Reduce DNS Lookup in Wordpress Blog


Hey,Recently I am optimize my blog and their GTMATRIX Score is Good 98% but in Yslow score I am seeing that Reduce DNS Lookup..!!

Can this is increase my server response time…??

How to Reduce DNS lookup of my website…???

Please provide some step by step guide or plugins…??


As long as u r using Google adsense, u cannot do much to reduce DNS lookups. There will be many DNS lookups to load the ads.

However, one factor which i have found beneficial to load adsense ads faster is to use DNS prefetching. So i prefetch the top 4 urls of google such as etc

Please read online on what plugins to use for dns prefetching as i use a pro plugin to do the same. OR @GulshanKumar can help u with that.


To reduce DNS lookup impact, you can use DNS Prefetch resource hint markup. This allow browser to pre-resolve DNS lookup.

Browser Supports

Data source: Caniuse

Implementation in WordPress
WordPress may add sometime, however few domains may goes missing.

Use Genesis Hooks Plugins genesis_doctype field markup to add properly.

Alternatively, you may use below snippet in theme functions.php file.

function gk_dns_prefetch() {
    echo '<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="dns-prefetch" href="//" />
<link rel="dns-prefetch" href="//" />
// Adding few more
<link rel="dns-prefetch" href="//" />';
add_action('wp_head', 'gk_dns_prefetch', 0);

Performance Gain
It can be noted in Browser network timeline.


Thanks @GulshanKumar, I hop This is helpful for me…!!


You’re welcome! :slight_smile:


I have few doubts in DNS and please someone clarify my doubts.

Shall We Add the TTL for DNS in the following order
A Record at 43200
CNAME Record at 86400

Domain Registrar was ResellerClub but enabled with Cloudflare DNS only.
Which DNS Service will take the effect?

Also, we have a DNS function in our Webserver as well. Does changing values in those records have any effect?

  1. In case you want to change hosting, you may need to wait longer for the DNS propagation. So, a lowest TTL is generally preferred. If you are confident with your host, you may keep longer.

  2. The nameservers which you are using - Cloudflare DNS will be active.

  3. Nothing impact. Just make sure all DNS records are present as before.


What DNS service are you currently using brother?


Using Cloudflare.