Find by Category

Shopify: Add preconnect dns-prefetch link tags to your store

This post will help add preconnect crossorigin and dns-prefetch link tags to your shopify store to speed up page load and improve core web vital score.

Follow these steps or watch the video below.

  1. Login to your shopify admin area
  2. Click Online Store
  3. Click Edit Code from Actions
  4. Add the following code to your theme.liquid head section
  5. Replace href attribute with your store domain name
  6. Click Save button

That’s it, you are all done.

<link rel="preconnect" href="" crossorigin>
<link rel="dns-prefetch" href="">