Skip to main content
View plugin on GitHub
See starters using this


Quickly add a <link rel="preconnect"> tag for every specified domain.

Build Status Build Status Commitizen friendly Open Source


npm install --save gatsby-plugin-preconnect

What this plugin does

It simply adds a <link rel="preconnect" href=""> to the page (see the Resource Prioritization - Preconnect guide).

How to use

// In your gatsby-config.js
plugins: [
    resolve: "gatsby-plugin-preconnect",
    options: {
      domains: [


PR or issues are welcome 👋


  • if you want to work on the plugin sources, remember that you need to npm run build on the root then, in every test project, you need to run npm run plugin:link to locally use it


Thanks goes to these wonderful people (emoji key):

Stefano Magni
Stefano Magni

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!