Coding

Programmatic SEO Architect Prompt Template

Design a scalable programmatic SEO system for Next.js covering architecture, dynamic routing, metadata, structured data, sitemaps, and content safeguards for 100–10,000 pages.

Last updated

The prompt

ROLE: You are a senior full-stack engineer and technical SEO architect who has built and scaled programmatic SEO systems to 100,000+ pages for SaaS and marketplace products. CONTEXT: My Next.js project is generating programmatic pages from structured data, but I'm running into issues — Google is either ignoring the pages, flagging them for thin/duplicate content, or my architecture doesn't scale cleanly. I need a comprehensive audit and rebuild plan. TASK: Audit and design a scalable programmatic SEO system for my Next.js project that handles [PAGE_COUNT] pages safely and ranks well in search. RULES: • Cover all 8 areas below — do not skip any even if brief • For each area, provide: a diagnosis of common issues, your recommended approach, and at least one code snippet or concrete example • Recommend specific Next.js rendering strategies (SSG/ISR/SSR) per page type with justification • All code examples must be production-quality TypeScript using Next.js App Router conventions • Flag the 3 highest-risk areas for this specific use case CONSTRAINTS: Focus on Next.js App Router (not Pages Router). Use TypeScript in all code examples. Prioritise indexability and Core Web Vitals over feature completeness. EDITABLE VARIABLES: • [PROJECT_DESCRIPTION] — framework version, current page count, main content type (e.g. "Next.js 14, 5,000 location pages for a local services directory") • [PAGE_COUNT] — target scale of programmatic pages • [SCHEMA_TYPE] — the structured data type that fits your pages (Article, FAQ, Product, LocalBusiness, etc.) • [CURRENT_PROBLEM] — what's going wrong right now (GSC errors, low impressions, duplication warnings) OUTPUT FORMAT: 1. AUDIT — Issues, risks, and architectural gaps 2. ARCHITECTURE — Dynamic routing strategy + folder structure + template pattern 3. SEO FOUNDATIONS — Per-page metadata implementation with code example 4. STRUCTURED DATA — JSON-LD schema example for [SCHEMA_TYPE] 5. INTERNAL LINKING — Hub-and-spoke system design 6. SITEMAP STRATEGY — Sitemap index + grouped sitemaps code 7. PERFORMANCE — Rendering strategy recommendation + Core Web Vitals notes 8. SAFEGUARDS — Thin content checks, duplicate slug prevention, content variation rules QUALITY BAR: After implementing this architecture, every new page added to the system should be automatically SEO-correct with zero manual intervention needed. The system should scale from 100 to 10,000 pages without architectural changes.

Replace every [BRACKETED] placeholder with your own details before running it.

How this prompt is structured

Output format

8-section technical audit and implementation plan with TypeScript code examples throughout

Why this template works

Breaking the problem into 8 explicit areas prevents the AI from giving a superficial overview. Requiring production-quality TypeScript code rather than pseudocode is the difference between a useful architectural plan and a theoretical one.

Pro tips

#1

Paste your current app/[slug]/page.tsx file and ask the AI to refactor it as part of the response — applied examples beat abstract advice

#2

Include your current Google Search Console performance screenshot description — it helps the AI prioritise which of the 8 areas to focus on

#3

Run this prompt once for the architecture, then use separate coding prompts for each individual section's implementation

#4

Add 'my content comes from [Notion/Airtable/Postgres]' to CONTEXT — the data source affects the rendering strategy recommendation significantly

Need this tailored to you?

Prompt𝙸t𝙸n rewrites any prompt with role, context, task, constraints and format — free.

Try it free →

More coding templates

Code Review

Get a comprehensive AI code review covering bugs, performance issues, security vulnerabilities, best practice violations, and refactoring opportunities with specific line references.

View →

Debug an Error

Diagnose any code error with a structured breakdown: root cause analysis, step-by-step fix, and prevention strategies for the future.

View →

Explain Code Simply

Translate complex code into plain English with line-by-line explanations, real-world analogies, and edge-case analysis for any skill level.

View →

Write Unit Tests

Generate thorough unit test suites covering happy paths, edge cases, and error scenarios. Supports Jest, Pytest, and other frameworks with at least 10 test scenarios.

View →

Related reading

Generate Test CasesHow to Use AI for SEOHow to Use AI for Content StrategyDatasetWrite a Technical SpecPrompts for SEO Specialists
Browse all prompt templates