How to add DNS Prefetch, Prefetch, preload and preconnect URLs in AMP

DNS Prefetch, Prefetch, Preload, and Preconnect is a new web standard that offers more control on how particular resources are fetched and it is another performance-enhancing technique. We can use it to tell the browser which assets the user might need in the future.

DNS prefetch

This notifies the client that there are assets we’ll need later from a specific URL so the browser can resolve the DNS as quickly as possible.

Prefetch

If we’re certain that a specific resource will be required in the future, then we can ask the browser to request that item and store it in the cache for reference later.

Preload

A new spec called preload suggests that sometimes it’s best to always download an asset, regardless of whether the browser thinks that’s a good idea or not. Unlike prefetching assets, which can be ignored, preloading assets must be requested by the browser.

Preconnect

Preconnecting is another speed-optimization HTML tag, in which the browser sets up an early connection before an HTTP request is actually sent to the server.

You will find this option in the WordPress Dashboard -> Navigate to AMP option panel -> Settings -> Advance Settings

Scroll down a little to see this option

DNS Priority URL(s): In this option, four options will be displayed as per your requirement, you need to select the Option.

For eg: I’ve selected the DNS-Prefetch and in this field, you need to enter DNS-Prefetch URL and if you want to add more URLs the click on the “Add More” button and then click on the”Save Changes” button which you can see in the below screenshot.

The Output of the DNS Priority URL(s) in AMP

That’s it for this tutorial!

We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.


Share
Published by
Sonali R

How to create an AWeber form in AMP

If you want to add an AWeber form in AMP then first you need to…

3 years ago

How to setup webpushr notification in AMP

Webpushr is the fastest growing web push notifications platform that marketers love & developers rely…

3 years ago

How to add Adobe Analytics in AMP

Follow these steps to add Adobe Analytics in AMP Step 1: Go to WordPress Admin Area -> AMP…

3 years ago

What is the CWV plugin all about

Core Web Vitals are the subset of Web Vitals that apply to all web pages,…

4 years ago

How to fix “Alternate page with proper canonical tag” Page Index issue in Google Search Console

The following reasons can be shown for non-indexing. Server error (5xx) Your server returned a 500-level…

4 years ago

Google Analytics ( GA4 ) integration in AMPforWP

We have added the Google Analytics 4 ( GA 4 ) integration in AMPforWP v1.0.80.…

4 years ago