Next.js SEO optimization guide. Use when building Next.js apps, optimizing for search engines, fixing Google indexing issues, implementing metadata, sitemaps, robots.txt, JSON-LD, or auditing SEO.
npx playbooks add skill laguagu/claude-code-nextjs-skills --skill nextjs-seo
Start from the page's task, production response and observed search behavior.
Read the installed Next.js version and relevant node_modules/next/dist/docs/
pages (bundled from 16.2); otherwise use matching official documentation.Metadata, Viewport and MetadataRoute types are also innode_modules/next/dist/lib/metadata/types/metadata-interface.d.ts. Keep
framework APIs, caching mode and deployment policy consistent with the project.
Useful, distinct content matters more than a longer page. Give titles,
headings and descriptions separate jobs; add a FAQ, summary, badges or extra
pages only when they help the reader. Publication dates must reflect meaningful
changes. Verify authorship, credentials and factual claims.
and canonicals before adding markup. A sitemap supports discovery; it does
not make a page indexable or guarantee indexing.
A Client Component can be server-prerendered; use client alone does not
remove content from HTML. Check the raw response for a visible phrase and a
data value from each important section: hydration hides a missing section in
the browser, and the build can still pass. See
[Troubleshooting](references/troubleshooting.md#content-missing-from-the-served-html).
metadata URLs with the correct production metadataBase and verify emitted
absolute URLs. Do not rely on missing-base behavior across versions/hosts.
A database query alone does not guarantee publication updates reach them.
With Cache Components enabled, follow the installed Next.js caching docs
(node_modules/next/dist/docs/). No cache setting is an SEO directive, but
a short cacheLife also decides whether content is in the prerendered HTML.
Check current rich-result eligibility instead of adding every schema type.
retrieval have different controls; robots rules are not access control.
Separate evidence in the report: a performance export shows queries/traffic;
URL Inspection and indexing reports address crawl/index/canonical status;
field measurements address Core Web Vitals. Lighthouse is a lab diagnostic
and cannot establish field INP. Good field thresholds at the 75th percentile
are LCP ≤ 2.5 s, INP ≤ 200 ms and CLS ≤ 0.1.
Verify status, headers and the complete production response for what changed:
page HTML (including relevant bot responses), the sitemap or robots body, or the
image URL. When rendering or client code changed, or an audit covers rendering,
also open the route directly and test its interaction. A spoofed
User-Agent tests response handling, not actual verified bot access. Report
unavailable checks explicitly and avoid ranking, indexing or citation promises.
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.