Library
Code and markup patterns
Short snippets for the Next.js App Router: metadata, JSON-LD Schema.org, sitemap, robots, redirects, and canonical. Drop into your repo and cross-check with search engine requirements and your delivery checklist.
Who this section is for
Product owner
A map of the moving parts: canonical, schemas, sitemap—what sits behind “technical SEO” and what to ask your team.
Developer
App Router–ready snippets: less doc spelunking, faster integration in your codebase.
SEO specialist
How UI ties to structured data; indexing and redirects in code, not only in slide decks.
Long reads live in Blog; projects in Case studies; hub navigation on the Library.
Level reflects depth in Next.js, TypeScript, and SEO/markup: basic (follow the snippet), intermediate (integrate in App Router), advanced (policies and edge cases in search).
Time estimate is a guide for reading and a first implementation in a typical project; your process may differ.
Filter by topic
Patterns by topic
All topics in one list. Use the filter above to narrow it down.
- IndexingDeveloperTypeScript
Dynamic sitemap.xml in Next.js (app/sitemap.ts)
One sitemap with static and content URLs; aligned with collectIndexableUrls and canonical URLs.
- Level:
- intermediate
- Time estimate:
- ~40 min
- IndexingSEOTypeScript
robots.txt and robots metadata in Next.js App Router
Static robots via app/robots.ts and per-route noindex via generateMetadata.
- Level:
- beginner
- Time estimate:
- ~25 min
- JSON-LDDeveloperTypeScript
BreadcrumbList JSON-LD for internal pages
One helper feeds both visible breadcrumbs and markup — names and URLs stay in sync.
- Level:
- beginner
- Time estimate:
- ~15 min
- JSON-LDDeveloperTypeScript
Extending JSON-LD Organization and WebSite in the root layout
Linked @id values in @graph: organization, person, site — the base for other entities.
- Level:
- intermediate
- Time estimate:
- ~45 min
- Markup and policiesSEOTypeScript
FAQ and HowTo JSON-LD: when markup is appropriate
Avoid markup “for stars only”: visible content, one primary intent per page, Google guidelines.
- Level:
- advanced
- Time estimate:
- ~30 min for policy
- Next.jsSEOTypeScript
Canonical URL and page metadata in Next.js App Router
A generateMetadata pattern with canonical and Open Graph — baseline SEO hygiene.
- Level:
- beginner
- Time estimate:
- ~20 min
- Next.jsDeveloperTypeScript
Permanent redirects in Next.js (config and middleware)
301/308 for slug changes and duplicate consolidation; watch for loops and canonical drift.
- Level:
- intermediate
- Time estimate:
- ~35 min
- PerformanceDeveloperTypeScript
Core Web Vitals in a production Next.js app: LCP, INP, CLS
Practical levers: LCP image priority, stable layout, splitting heavy JS.
- Level:
- intermediate
- Time estimate:
- ~1 h for an audit
Want the same setup for your site?
Short form: name, phone, and site. After you submit, we reply with technical next steps and phasing; scope is refined on a call.