SEO & Metadata
Meta tags, structured data, and the long tail of "what does Google want".
Meta tag helpers
- ★ Next.js Metadata API —
metadata/generateMetadataexports; the default for Next.js App Router. - next-seo — older Next.js helper; less needed now that Metadata API exists, but still used.
- unhead — universal head management; used by Nuxt, Vue, Solid, Svelte.
- react-helmet-async — older React option; less recommended for new projects.
- Astro built-in
<head>slot — Astro is simple enough you don't need a library.
Structured data (JSON-LD)
- ★ schema-dts — TypeScript types for schema.org JSON-LD. Default for "I want autocomplete on
Articleproperties." - next-seo has a
JsonLdcomponent for common schemas. - Astro Schema Org integration.
- Hand-written
<script type="application/ld+json">is fine; types help.
Sitemaps
See Sitemap & Feeds.
Open Graph / Twitter / social
- See OG Images for dynamic image generation.
- For tags themselves, the Metadata API / unhead handle
og:*andtwitter:*automatically.
Robots / crawl
robots.txt—next-sitemapand most frameworks generate this.- Cloudflare's bot management — to allow / block AI bots, Googlebot variants, etc.
<meta name="robots">— page-level overrides.
Canonical / hreflang
- ★ Always set
<link rel="canonical">for canonicalized URLs (utm params, query-shuffled URLs). - For multi-language sites, set
hreflangper-locale; next-intl and Paraglide can generate.
Validators / testers
- Google Rich Results Test — paste a URL, see what JSON-LD Google parses.
- Schema.org Validator — replaces the old "Structured Data Testing Tool."
- Twitter Card Validator / LinkedIn Post Inspector / Facebook Sharing Debugger — for social previews.
- Lighthouse SEO audit — built-in, fine for basics.
- Ahrefs Webmaster Tools, Bing Webmaster Tools — free monitoring.
- Google Search Console — non-negotiable; free.
Performance for SEO
Core Web Vitals are real ranking factors. See Observability and Load Testing — web-vitals and Lighthouse CI.
AI / LLM discoverability
In 2026, "appearing in AI answers" is its own discipline:
/llms.txt— emerging convention; a Markdown file at root listing your key URLs for LLMs.ai.txt/ai-policy.txt— declare your AI training policy (advisory).- Structured data still matters; LLMs ingest it during training and via tools.
- Cloudflare's "AI Audit" — see what AI bots are crawling you.
Pick this if…
- Default Next.js: Metadata API.
- Vue / Nuxt / Astro / Solid: unhead.
- JSON-LD with types: schema-dts.
- Validate before shipping: Google Rich Results Test + Search Console.
- Discoverable in AI: add
llms.txt.