Install DNS Prefetch to Increase Website Speed

How to Increase Blogger Site Speed by DNS Prefetch - 100% Effective

Want to Increase WordPress or Blogger or any platform website Speed? then you must use the DNS Prefetching method. We all know Site Speed is one of the most important ranking factors in any search engine. So Do you have a slow website? Do you want to speed up your website? If your answer is yes, then this article is for you.

There are many small techniques and practices that speed up a website DNS Prefetch to Increase Website Speed is one of them. Domain Name System Prefetching is one way to speed up the loading of certain domains and will certainly impact the speed of our blog.

In any website, we request CSS or JS or Img or anything from another Domain Right!, So DNS Prefetching is one of the ways to request quicker. To use it we just need to add the relation attribute for requested domains. 

Install DNS Prefetch to Increase Website Speed
Install DNS Prefetch to Increase Website Speed


This is a simple web performance optimization technique. Knowing what domains your application might use and pre-fetching the domain can shave some milliseconds per domain from your loading experience.

Example:

<!-- Google Blogger -->
<link href='//1.bp.blogspot.com' rel='dns-prefetch'/>
<link href='//28.2bp.blogspot.com' rel='dns-prefetch'/>
<link href='//3.bp.blogspot.com' rel='dns-prefetch'/>
<link href='//4.bp.blogspot.com' rel='dns-prefetch'/>
<link href='//2.bp.blogspot.com' rel='dns-prefetch'/>
<link href='//www.blogger.com' rel='dns-prefetch'/>
<!-- Bootstrap CDN -->
<link href='//maxcdn.bootstrapcdn.com' rel='dns-prefetch'/>

What is DNS Prefetching to Increase Website Speed in Blogger or WordPress?

A DNS or domain name server converts IP addresses into readable website URLs such as yourwebsite.com. Whenever a user requests an asset being hosted on a particular domain they must perform a DNS lookup and find which domain name that IP address belongs to. This process takes time and the most DNS lookups that are required, the longer your visitors will be waiting for a page to load.

This process is often called "DNS prefetching".

For more about it: visit - https://www.keycdn.com/support/prefetching

How DNS Prefetch help us?

DNS Prefetch attribute will give commands to the browser to finish rendering the Domain name as soon as possible then for a while the browser will bind it and when visitors scroll the blog page, the browser will automatically display the blog page faster because an external link with the DNS Prefetch tag is considered has finished loading.

The main reason for rel=dns-prefetch to exist is to speed up the way web pages load when they are using different domains for page resources. So let's use a modern solution to speed up your website.


Steps to Use or Install DNS Prefetch in Website to increase website speed Blogger and WordPress

Improve your Blogger Website Speed performance you can use the DNS prefetch relation attribute of the most commonly used domain listed below.

How to Apply DNS Prefetch in Blogger?

  1. Open Blogger Dashboard
  2. Open Theme Section
  3. Click on Edit Theme - Edit HTML
  4. Now Locate <head> tag
  5. Add specific DNS-prefetch links below <head>
  6. Save Theme That's it

How to Apply DNS Prefetch in WordPress?

If your Theme has a Child theme then Apply DNS Prefetch to Increase Website Speed and edit in your child theme so it won't affect the main theme.

  1. Login to WordPress Dashboard
  2. Open Appearance -> Editor
  3. Open function.php
  4. Now Copy and Paste the below Script and Add markup that is used by your theme.
  5. Update file. That's it
More Useful Script: Lazy Load Google Adsense Ads

Add below code section:


function arpian_dns_prefetch() {
echo '<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
<link rel="dns-prefetch" href="//fonts.gstatic.com" />
<link rel="dns-prefetch" href="//ajax.googleapis.com" />
<link rel="dns-prefetch" href="//apis.google.com" />
<link rel="dns-prefetch" href="//youtube.com" />
<link rel="dns-prefetch" href="//s.gravatar.com" />
<link rel="dns-prefetch" href="//s0.wp.com" />
<link rel="dns-prefetch" href="//stats.wp.com" />';
}
add_action('wp_head', 'arpian_dns_prefetch', 0);

List of Markup for Blogger and WordPress -


<!-- Google Blogger -->
<link href='//1.bp.blogspot.com' rel='dns-prefetch'/>
<link href='//28.2bp.blogspot.com' rel='dns-prefetch'/>
<link href='//3.bp.blogspot.com' rel='dns-prefetch'/>
<link href='//4.bp.blogspot.com' rel='dns-prefetch'/>
<link href='//2.bp.blogspot.com' rel='dns-prefetch'/>
<link href='//www.blogger.com' rel='dns-prefetch'/>
<!-- Bootstrap CDN -->
<link href='//maxcdn.bootstrapcdn.com' rel='dns-prefetch'/>
<!-- Google Fonts -->
<link href='//fonts.googleapis.com' rel='dns-prefetch'/>
<!-- Font Awesome -->
<link href='//use.fontawesome.com' rel='dns-prefetch'/>
<!-- Google CDN -->
<link href='//ajax.googleapis.com' rel='dns-prefetch'/>
<link href='//resources.blogblog.com' rel='dns-prefetch'/>
<link href='//feeds.feedburner.com' rel='dns-prefetch'/>
<!-- Microsoft CDN -->
<link href='//ajax.microsoft.com ' rel='dns-prefetch'/>
<link href='//ajax.aspnetcdn.com ' rel='dns-prefetch'/>
<!-- Github -->
<link href='//github.com' rel='dns-prefetch'/>
<!-- CDN JS -->
<link href='//cdnjs.cloudflare.com' rel='dns-prefetch'/>
<!-- Google Analytics -->
<link href='//www.google-analytics.com' rel='dns-prefetch'/>
<!-- Google Services -->
<link href='//themes.googleusercontent.com ' rel='dns-prefetch'/>
<link href='//pagead2.googlesyndication.com' rel='dns-prefetch'/>
<link href='//googleads.g.doubleclick.net' rel='dns-prefetch'/>
<link href='//www.gstatic.com' rel='preconnect'/>
<link href='//www.googletagservices.com' rel='dns-prefetch'/>
<link href='//static.xx.fbcdn.net' rel='dns-prefetch'/>
<link href='//tpc.googlesyndication.com' rel='dns-prefetch'/>
<link href='//apis.google.com' rel='dns-prefetch'/>
<!-- Facebook -->
<link href='//www.facebook.com' rel='dns-prefetch'/>
<link href='//connect.facebook.net' rel='dns-prefetch'/>
<!-- Google Plus -->
<link href='//plus.google.com' rel='dns-prefetch'/>
<!-- Twitter -->
<link href='//twitter.com' rel='dns-prefetch'/>
<link href='//platform.twitter.com' rel='dns-prefetch'/>
<link href='//syndication.twitter.com' rel='dns-prefetch'/>
<link href='//r.twimg.com ' rel='dns-prefetch'/>
<link href=' http://p.twitter.com ' rel='dns-prefetch'/>
<link href=' http://cdn.api.twitter.com ' rel='dns-prefetch'/>
<!-- YouTube -->
<link href='//www.youtube.com' rel='dns-prefetch'/>
<!-- Pinterest-->
<link href='//www.pinterest.com' rel='dns-prefetch'/>
<!-- Linkedin -->
<link href='//www.linkedin.com' rel='dns-prefetch'/>
<!-- Vimeo -->
<link href='//player.vimeo.com' rel='dns-prefetch'/>
<!-- Amazon S3 -->
<link href='//s3.amazonaws.com ' rel='dns-prefetch'/>
<!-- Just Add All Requested Scripts or Resources like this -->
<link href='//requesturl.domain ' rel='dns-prefetch'/>

NOTE: Remember that you should not use all the 'DNS-prefetch' markup. Suppose you don't use any amazon-AWS link on your website so you don't have to use the markup for amazon-aws. But you should use all Google and Blogger services 'DNS-prefetch' markup.

Next Follow this Article: Defer google tag manager script to increase website speed 

Amazing Script: Create Speech to Text Converter in blogger 

For a complete demo of the script with a proper installation and usage guide please watch the complete video.

DNS Prefetch to Increase Website Speed in Blogger




Browser compatibility

This Relation Attribute is introduced in HTML5 and now all browser supports it. Example major browsers (Safari 5.0+, IE 9.0+, Firefox 3.5+, Google Chrome), except for Android IOS Safari, Android Opera Mini, and Android Browser.

So now it's time for Conclusion Right!

In Conclusion of Install DNS Prefetch to Increase Website Speed

Use the DNS Prefetch method on your website to increase your blog speed. The above-provided link tags are frequently used so use only those domains that is requested by your website. 

Visit our Website for more such types of tricks and scripts: Thanks for Visiting.

Also Read and Use:  Keyword Generator Tool Website Script

Responsive Bottom Sticky Ads

Download Button witTimer in blogger

Previous
Next Post »

3 comments

Click here for comments
Jack son
admin
31 August 2021 at 06:13 ×

web facilitating space is an area where you can set up your site for the world to visit. Web facilitating suppliers make the space accessible on their workers. https://onohosting.com/

Reply
avatar