nextjs-seo

Generate Next.js App Router metadata, sitemaps, and robots rules for SEO.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/jean-sotil/presskitpro-webapp --skill nextjs-seo-jean-sotil
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-seo
Source: https://github.com/jean-sotil/presskitpro-webapp/tree/main/.claude/skills/nextjs-seo
Command: npx skills add https://github.com/jean-sotil/presskitpro-webapp --skill nextjs-seo-jean-sotil

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This guide helps you correct common Next.js SEO issues by ensuring your pages publish consistent metadata, robots rules, and sitemap coverage so search engines can discover and understand your content.

Core Features & Use Cases

  • Metadata and Open Graph correctness: Set root and page-level titles, descriptions, canonicals, and social previews using the Next.js App Router metadata model.
  • Sitemaps and robots.txt accuracy: Generate app/sitemap.ts and app/robots.ts to control crawling behavior without blocking render-critical assets.
  • Structured data (JSON-LD) readiness: Add JSON-LD structured data patterns (e.g., Organization, WebSite, Article) and validate that it matches visible content.
  • Rendering strategy for indexable content: Use caching, SSG/SSR, and avoid CSR-only SEO pages to improve crawlable HTML and Core Web Vitals.

Quick Start

Apply the recommended patterns by implementing metadata and viewport in app/layout.tsx, then add app/sitemap.ts and app/robots.ts and verify via sitemap and page-source checks.

Frequently Asked Questions about nextjs-seo

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Next.js App Router metadata for SEO and Google indexing?

To fix Next.js App Router metadata for SEO, implement the metadata and viewport exports in app/layout.tsx to define root titles, descriptions, and canonicals, ensuring pages publish consistent metadata for Google indexing and search discovery.

How do I generate a sitemap and robots.txt in Next.js without blocking crawling?

Generate a sitemap and robots.txt in Next.js using app/sitemap.ts and app/robots.ts endpoints. Prevent crawler blocking by ensuring robots rules do not restrict render-critical resources like the /_next/ directory.

Does Next.js Core Web Vitals rendering strategy affect search indexing?

Yes, Next.js Core Web Vitals rendering strategy affects indexing. Use SSG or SSR to serve crawlable HTML, and avoid CSR-only SEO pages to improve Core Web Vitals metrics and ensure search engines can render content properly.

How do I add JSON-LD structured data to Next.js pages for SEO?

Add JSON-LD structured data to Next.js pages by including schemas like Organization, WebSite, or Article in your components. Validate that the structured data accurately matches the visible content on the page for search engine comprehension.

What is the best way to set up canonical URLs and Open Graph tags in Next.js?

The best way to set up canonical URLs and Open Graph tags in Next.js is using the App Router metadata model. Define metadataBase and page-level metadata exports to control canonicalization and social preview rendering.

Why are my Next.js pages not showing up in Google search results?

Next.js pages may not show in Google search results due to incorrect metadata configuration, missing sitemap entries, or robots.txt rules blocking render-critical assets. Verify metadataBase settings and ensure crawlers can access /_next/ resources.