Updated 2026-10-20
Add SEO metadata to any site with a script tag
Some sites let you paste code into the head but give you no build step. For those, Headlark has a snippet. Be clear about the trade-off first: tags added by JavaScript are seen by Google, which renders JavaScript, but not by Bing or by the link previewers of Facebook, LinkedIn, Slack and X, which read the raw HTML. If you can use the build step or Webflow, do.
1. Add the snippet to every page
<script src="https://headlark.com/v1/s.js" data-site="<site id>" async></script>
Your site id is in the dashboard.
2. Call the deploy hook after each change
The snippet never asks Headlark to write anything. SEO is written when your deploy hook is called, from the pages Headlark fetches from your live site:
curl -X POST "https://headlark.com/api/v1/hook?token=$HEADLARK_KEY" \
-H "content-type: application/json" \
-d '{"url": "https://example.com"}'
Vercel and Netlify can call it for you after each production deploy; see the deploy hook docs.
How it works
- The hook reads your
/sitemap.xml(or just your home page if there is none) and fetches every page it lists. - For each page it publishes a small static file with that page's tags. The snippet downloads it from a CDN and applies it.
- No file yet for a page? The snippet does nothing.
- Page views never reach Headlark's servers, cost nothing, and can't change what other visitors get.
- The snippet never adds a canonical when your page already has one.
The snippet docs have the reference. The free SEO checker reads the raw HTML, so it shows a page the way Bing and link previewers see it: without the snippet's tags.
Limits
- Google only, as above.
- Pages that render only in the browser look empty when Headlark fetches them. Prerender them at build time and use the build step.
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.