Updated 2026-10-20

Add SEO meta tags on Netlify with a build plugin

On Netlify you don't need to touch your build command. The netlify-plugin-headlark Build Plugin runs Headlark on your publish directory after the build, with your site's main URL as the base for page URLs and canonicals.

1. Install

npm i -D netlify-plugin-headlark

2. Enable it

# netlify.toml
[[plugins]]
package = "netlify-plugin-headlark"

  # optional: fail the build if a page can't be optimized
  [plugins.inputs]
  strict = true

3. Add your key

Site configuration → Environment variables → add HEADLARK_KEY with your site's secret key from the dashboard.

How it works

The Netlify docs list the plugin's options. To see what your live site is missing before you enable it, run the free site checker on it.

Already using a deploy notification?

A Netlify outgoing webhook (see the deploy hook docs) publishes SEO for the snippet, which only Google sees. If you can add a build plugin, prefer the plugin.

Try it

The free plan covers one site and 25 pages. Add your site, copy its secret key, and your next build ships with SEO.