← Back to dashboard

SEO Developer Course & Resource Guide

What is SEO?

The real model

robots.txt + honest sitemap + on-page signals + JSON-LD + CWV → ranked and cited.

Ship robots.txt (crawl control, NOT an index blocker — that's noindex) with an explicit AI-crawler policy, and a sitemap with honest lastmod (Google ignores priority/changefreq; 50k URLs / 50MB per file). Per page: unique <title> (~60 chars), meta description (~155), server-rendered rel=canonical, Open Graph, one h1, alt text. JSON-LD must match visible text — FAQ rich results were retired on 2026-05-07. AI Overviews/AI Mode need nothing extra: indexed + snippet-eligible; opt out via Search Console's Search generative AI control. Keep LCP ≤ 2.5s and INP ≤ 200ms. In Next.js 16, robots.ts + sitemap.ts + opengraph-image.tsx + the Metadata API generate it all. codeAmani default is US-first (USD, en_US); Kenya-targeted projects add Swahili hreflang, KES offers and 3G LCP budgets.

Six things to ship

The files and signals that get you crawled, ranked, and cited. Tap a card for the details.

SERP & share previewer — see your snippet before you ship

Type a title and meta description and watch the Google result, the social share card, and the JSON-LD update live — with length meters that warn before your title or description gets truncated. This is the fastest way to learn what makes a click-worthy snippet.

Title43/60 — good
Description129/160 — good
cA
codeAmani Labs
example.com › stripe-checkout
Stripe Checkout in Next.js | codeAmani Labs
Add Stripe Checkout to a Next.js 16 app: server action, webhook signature check, and idempotent fulfilment, with copy-paste code.

Google truncates by pixel width (~60 chars title, ~155–160 description) — keep the key message first.

Text
███████╗███████╗ ██████╗
██╔════╝██╔════╝██╔═══██╗
███████╗█████╗  ██║   ██║
╚════██║██╔══╝  ██║   ██║
███████║███████╗╚██████╔╝
╚══════╝╚══════╝ ╚═════╝

SEO Developer Course & Resource Guide

Focus: This is a developer's hands-on path to getting found by search engines, by AI answer engines (AI Overviews, AI Mode, ChatGPT search, Claude, Copilot, Perplexity) and by agents. It covers crawl control and AI-crawler policy, sitemaps and IndexNow, on-page signals, structured data, Core Web Vitals, measurement through the Search Console and Bing APIs, and a Next.js 16 reference implementation. Every fact was checked against official sources (Google Search Central, Google crawling docs, nextjs.org, indexnow.org, Bing, OpenAI, Anthropic, Perplexity, Cloudflare, llmstxt.org) and was reviewed 2026-10-20.

How this course works

The course has eight parts. Most end with a ✅ capability checkpoint. The interactive learn module above this page is a live SERP, social card and structured-data previewer, and it illustrates Parts 3–4. Every file you need is linked from §Templates, and the runnable versions are in examples/.

Table of Contents

  1. How discovery works in 2026
  2. Crawl control & sitemaps covers robots.txt, sitemap.xml and IndexNow
  3. On-page SEO covers titles, meta, canonical, Open Graph and preview controls
  4. Structured data covers JSON-LD and what still earns rich results
  5. Technical SEO & performance covers Core Web Vitals (INP) and Lighthouse 13
  6. AI search, AI crawlers & llms.txt
  7. Measurement · Next.js 16 implementation · Templates · codeAmani notes

Versions & facts (verified 2026-10-20)

ItemCurrentSource
next16.4.2 (latest; 16.5 in canary)npm view next version
schema-dts2.1.0 (2026-10-02)npm
web-vitals6.2.3 (2026-10-05). onLCP / onINP / onCLS, plus a web-vitals/attribution buildnpm, GitHub README
google-auth-library11.3.1 (for the Search Console API)npm
next-sitemap4.2.3, last published 2023-09-06. Not needed, because app/sitemap.ts covers itnpm
Latest Google core updateMay 2026 core update (21 May, about 12 days). Earlier: March 2026 and December 2025Search Status Dashboard
Latest Google spam updateSeptember 2026 spam update (24 Sep, about 14 days)same
Core Web VitalsLCP ≤ 2.5 s · INP ≤ 200 ms · CLS ≤ 0.1 at p75web.dev, matching the lighthouse/ guide
Sitemap limits50,000 URLs or 50 MB uncompressed per fileGoogle build-sitemap docs
IndexNow≤ 10,000 URLs per POST. Google does not participateindexnow.org

Official Documentation


1. How discovery works in 2026

  • Crawl. Bots fetch your pages. robots.txt says where they may go, but it doesn't hide pages from the index. Your CDN and WAF can also block crawlers silently, so check those too.
  • Index. The engine stores and understands the page. Clean, server-rendered HTML and accurate structured data help here.
  • Rank. Relevance, quality and page experience decide the order. Google runs core updates several times a year (March and May 2026 were the most recent) plus continuous smaller ones, and it now says sites can recover between big updates.
  • Cite. Google's AI Overviews and AI Mode use retrieval-augmented generation over the Search index plus query fan-out, which issues several related sub-queries. To be cited, a page must be indexed and eligible to show with a snippet. Google lists no other technical requirement. Other engines, such as ChatGPT search, Claude, Copilot and Perplexity, run their own crawlers and indexes.

💡 The mindset shift, corrected. In 2024–25 the advice was to "optimize separately for LLMs". Google's own 2026 guidance says the reverse: generative AI features "are rooted in our core Search ranking and quality systems". So do good SEO and write non-commodity content (first-hand, expert, specific). Make deliberate per-bot decisions for the non-Google AI crawlers.


2. Crawl control & sitemaps

robots.txt: where crawlers may go

The file lives at /robots.txt. It manages crawl traffic. It isn't an index blocker: a disallowed URL that other pages link to can still be indexed without its content. Use noindex to keep a page out of the index.

Text
# /robots.txt
User-agent: *
Allow: /
Disallow: /admin/
Disallow: /api/

Sitemap: https://example.com/sitemap.xml

Google supports only user-agent, allow, disallow and sitemap, and ignores anything past 500 KiB. It does not support crawl-delay, although some other crawlers (Anthropic, for example) do. Google also ignores a non-standard line like Content-Signal. AI-crawler groups are covered in §6.

sitemap.xml: what exists

The file lives at /sitemap.xml. <loc> is required. Facts from Google's sitemap docs:

  • Google ignores <priority> and <changefreq>. Leave them out.
  • Google uses <lastmod> only if it's "consistently and verifiably" accurate. Set it to the last significant content change. A copyright-year bump or new Date() on every build doesn't count.
  • Limits: 50,000 URLs or 50 MB uncompressed per file. Beyond that, split the file and use a sitemap index.
  • Submit it in Search Console, through the Search Console API, or with a Sitemap: line in robots.txt.
XML
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2026-10-01</lastmod>
  </url>
  <url>
    <loc>https://example.com/pricing</loc>
    <lastmod>2026-09-15</lastmod>
  </url>
</urlset>

IndexNow: push changes to Bing and others

IndexNow lets you tell participating engines that a URL changed instead of waiting for a recrawl. Bing uses it, and so do other engines that share submissions with each other. Google does not participate. For Google, rely on sitemaps with honest lastmod values.

  1. Generate a key of 8–128 characters (a-z A-Z 0-9 -) and serve it as https://<host>/<key>.txt.
  2. POST https://api.indexnow.org/indexnow with JSON { host, key, keyLocation, urlList }. Each POST takes up to 10,000 URLs.
  3. Responses: 200 OK · 202 accepted, key pending · 400 bad format · 403 bad key · 422 URL not on host · 429 slow down.

See examples/indexnow.mts. Submit only URLs that really changed. Spamming the endpoint earns a 429.

✅ Checkpoint: You know robots.txt ≠ noindex, you leave priority and changefreq out of your sitemap, your lastmod values are honest, and you push changed URLs to IndexNow for Bing.


3. On-page SEO: the signals on every page

HTML
<head>
  <!-- Title: the result headline + browser tab. Front-load the keyword; Google truncates by pixel width (~50–60 chars). -->
  <title>Stripe Checkout in Next.js | codeAmani Labs</title>

  <!-- Meta description: often (not always) the snippet. ~150–160 chars, unique per page. -->
  <meta name="description" content="Add Stripe Checkout to a Next.js 16 app: server action, webhook signature check, and idempotent fulfilment, with copy-paste code.">

  <!-- Canonical: the one true URL. Put it in the server HTML — Google canonicalizes before AND after rendering. -->
  <link rel="canonical" href="https://example.com/stripe-checkout">

  <!-- Indexing + preview controls (THIS is how you exclude or limit snippets, incl. in AI features). -->
  <meta name="robots" content="index, follow, max-image-preview:large">

  <!-- Open Graph — social cards (LinkedIn, Slack, WhatsApp, iMessage). Google also reads og:image for thumbnails. -->
  <meta property="og:title" content="Stripe Checkout in Next.js">
  <meta property="og:description" content="Server action + verified webhook, step by step.">
  <meta property="og:image" content="https://example.com/og/stripe-checkout.png">
  <meta property="og:type" content="article">
  <meta property="og:url" content="https://example.com/stripe-checkout">
  <meta name="twitter:card" content="summary_large_image">

  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>

Also put on every page: one <h1> and a logical heading outline, descriptive alt text, descriptive link text, semantic HTML (<nav>, <main>, <article>), and hreflang if you serve several languages or regions.

Preview controls also govern AI features. Google's AI Overviews and AI Mode follow nosnippet, data-nosnippet, max-snippet and noindex. Bing has supported data-nosnippet since October 2025. Wrap any text you never want quoted in <span data-nosnippet>…</span>.

2026 changelog items that matter:

  • Preferred image. Google picks Search and Discover thumbnails from both schema.org image and og:image (March 2026). Keep them consistent, and make the image large (max-image-preview:large).
  • Robots meta outside <head>. Google documented in March 2026 how it processes these tags. Its behavior didn't change. Keep the tags in <head> anyway.
  • JavaScript. Pages that return a non-200 status might not be rendered. If you might want a page indexed, don't put noindex in the initial HTML and then remove it with JS (December 2025).
  • Back-button hijacking is now an explicit spam policy (April 2026).

✅ Checkpoint: Every page has a unique title and description, a server-rendered canonical, OG tags with a large image, one h1 and alt text.


4. Structured data (JSON-LD)

JSON-LD is a set of machine-readable facts about the page. It can earn rich results, and it hands every consumer clean entities. Google recommends JSON-LD in a <script> tag. Validate with the Rich Results Test or the Schema Markup Validator.

HTML
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "Stripe Checkout in Next.js",
  "author": { "@type": "Organization", "name": "codeAmani Labs" },
  "datePublished": "2026-06-07",
  "dateModified": "2026-10-01",
  "image": "https://example.com/og/stripe-checkout.png"
}
</script>

What Google still shows (late 2026)

StatusTypes
GoneFAQPage rich results (stopped 2026-05-07, docs removed 2026-06-15). HowTo (2023). Course info, estimated salary, learning video, special announcement and vehicle listing (docs removed 2025-09-09). ClaimReview (phased out from 2025-06). Practice problem (deprecated 2025-11, reporting removed January 2026). Dataset (used only by Dataset Search, not Google Search)
Active, worth itArticle · BreadcrumbList · Organization (incl. merchant return and shipping policies, loyalty programs) · Product / merchant listing (with Offer, sale dates via validFrom/validThrough, category, hasAdultConsideration) · Review snippet (2026: no fake or undisclosed incentivized reviews) · LocalBusiness · VideoObject (2026: creator, interactionStatistic) · Event (physical, publicly bookable only) · DiscussionForumPosting / QAPage (more properties in 2026) · Recipe · JobPosting

Rules that matter more than the type list:

  • Structured data must match the visible text on the page.
  • It is not required for AI Overviews or AI Mode. Google calls "overfocusing on structured data" a myth to ignore. It still helps you qualify for rich results.
  • FAQPage markup stays valid schema.org and does no harm, but it earns nothing in Google. Don't sell a client "FAQ rich results".

Type your objects with schema-dts (WithContext<Article> and so on). See examples/jsonld.tsx.

✅ Checkpoint: Your key pages carry valid JSON-LD that matches the visible content and passes the Rich Results Test, and you don't count on FAQ or HowTo results.


5. Technical SEO & performance

Core Web Vitals (page experience)

Targets are measured at the 75th percentile of real users. These match the lighthouse guide:

MetricGoodNeeds improvementPoorMeasures
LCP≤ 2.5 s≤ 4.0 s> 4.0 sLoading
INP≤ 200 ms≤ 500 ms> 500 msResponsiveness (replaced FID on 2024-03-12)
CLS≤ 0.1≤ 0.25> 0.25Visual stability

INP is field-only: a lab run has no user interaction to measure. Use TBT as its lab proxy, and get real INP from CrUX, PageSpeed Insights, Search Console or the web-vitals library.

Lighthouse 13 and the SEO audit

Lighthouse 13.5.0 is current. Its SEO category checks automatable signals: <title>, meta description, crawlability (no blocking robots or noindex), a valid rel=canonical, descriptive link text, image alt, valid hreflang, HTTP status, a valid robots.txt and structured-data presence. The checks that moved out in v12 are viewport and font-size (now in Best Practices) and tap-targets (replaced by target-size in Accessibility). Lighthouse 13.3+ also adds an informational Agentic Browsing category with checks for llms.txt, WebMCP and ARD schema. It's a pass ratio, not a 0–100 score, and Google labels it under development.

Bash
# CI gate (Node ≥ 22.19 for lighthouse@13) — see the lighthouse + github guides for the workflow
npx lighthouse@13.5.0 https://example.com --only-categories=seo,performance --output=json --output-path=./lh.json

✅ Checkpoint: Lighthouse SEO ≥ 0.9 on key pages, mobile LCP ≤ 2.5 s, and field INP ≤ 200 ms.


6. AI search, AI crawlers & llms.txt

Google: AI Overviews and AI Mode

Google's AI optimization guide (May 2026, updated July 2026) and its AI features page say three things:

  • SEO still applies. The features use RAG over the Search index plus query fan-out. A page is eligible if it's indexed and snippet-eligible. Google lists no extra requirement.
  • Write non-commodity content. Bring a unique, first-hand or expert view, organize it for readers, and add good images and video. Don't mass-produce pages for every fan-out query: that falls under the scaled content abuse spam policy. Google's spam policies now explicitly cover generative AI responses (May 2026).
  • Ignore these "AEO/GEO" myths for Google: llms.txt and other special AI files or markup ("Google Search itself doesn't use them"), "chunking" content, rewriting content just for AI, chasing inauthentic mentions, and overfocusing on structured data.

Controls, from lightest to heaviest:

You want to…UseNotes
Limit what's quotednosnippet, data-nosnippet, max-snippetapplies to AI Overviews and AI Mode as well as snippets
Leave AI Overviews, AI Mode and Discover gen-AI but stay in SearchSearch Console → Settings → Search generative AI → Excluderolled out worldwide 2026-08-31. Not a ranking signal. Takes effect in 1–2 days. Child properties inherit from the parent property. It does not stop training
Stop Gemini training and Gemini/Vertex groundingUser-agent: Google-Extended + Disallowa robots.txt token only, with no separate fetcher. Doesn't affect Search, AI Overviews or ranking
Leave Google entirelynoindex—

Blocking Googlebot to dodge AI features blocks you from Search too. Don't.

AI crawler user agents (verified from each vendor's docs, 2026-10-20)

TokenVendorPurposeObeys robots.txt?Default stance
OAI-SearchBotOpenAIsurfaces sites in ChatGPT searchyesallow
GPTBotOpenAIfoundation-model trainingyesper project
ChatGPT-UserOpenAIuser-initiated fetches, GPT Actions"may not apply"n/a
OAI-AdsBotOpenAIchecks landing pages submitted as ChatGPT adsonly visits ad pagesn/a
Claude-SearchBotAnthropicimproves Claude search resultsyesallow
ClaudeBotAnthropictrainingyes (+ Crawl-delay)per project
Claude-UserAnthropicfetches pages when a user asks Claudeyesallow
PerplexityBotPerplexityPerplexity search results, not trainingyes, per its docsallow
Perplexity-UserPerplexityuser-initiated fetches"generally ignores" robots.txtn/a
Google-ExtendedGoogleGemini training and groundingyes (token only)per project
Applebot-Extended, CCBot, meta-externalagent, Bytespider, AmazonbotApple, Common Crawl, Meta, ByteDance, Amazonmostly trainingvariesper project

Search and answer bots send traffic and citations, so allow them. Training tokens are a business decision. Blocking GPTBot doesn't remove you from ChatGPT search, and blocking ClaudeBot doesn't remove you from Claude search. In Next.js 16.3+ you can emit the whole policy, including non-standard lines, from app/robots.ts. See examples/robots.ts.

Text
# Equivalent of examples/robots.ts with ALLOW_TRAINING = false (abridged;
# Next.js writes one User-Agent group per agent in the array)
User-Agent: *
Allow: /
Disallow: /admin/
Disallow: /api/
Content-Signal: search=yes, ai-input=yes, ai-train=no

User-Agent: OAI-SearchBot
User-Agent: Claude-SearchBot
User-Agent: PerplexityBot
Allow: /

User-Agent: GPTBot
User-Agent: ClaudeBot
User-Agent: Google-Extended
Disallow: /

Sitemap: https://example.com/sitemap.xml

Enforcing it: Cloudflare AI Crawl Control

robots.txt is a request. User-triggered fetchers (ChatGPT-User, Perplexity-User) may ignore it, and bad bots always do. On Cloudflare-proxied zones:

  • AI Crawl Control (formerly AI Audit, available on all plans) shows AI crawler traffic, lets you allow or block each crawler, and flags crawlers that violate your robots.txt.
  • Managed robots.txt (Bot Preference Sync) prepends Cloudflare's Content Signals Policy and Disallow groups for known training crawlers to your existing file. It defines three signals: search, ai-input and ai-train. Check the managed block with curl https://<host>/robots.txt after you enable it.
  • Pay per crawl (closed beta) answers unpaid AI crawlers with HTTP 402 Payment Required, and Cloudflare acts as merchant of record. A WAF block overrides it.

llms.txt: ship it for agents, not for Google

llms.txt is a community proposal, now at v2 (modified 2026-08-10, "open for community input"). The format is an H1 name (the only required part), a blockquote summary, optional prose, then H2 sections of - [name](url): notes, plus a skippable ## Optional section. v2 adds markdown twins: page.md or page.html.md (index.md for directory URLs), which pages advertise with <link rel="alternate" type="text/markdown">. A twin points back to its llms.txt with rel="describedby", as a <link> or an HTTP Link: header.

Google said on 2026-06-15 that llms.txt files "aren't needed for Google Search", that they "won't negatively or positively impact your visibility", and that keeping them for other systems is fine. That's codeAmani's position too. Ship llms.txt on docs and developer-facing products, where coding agents and IDE assistants read it. Don't sell it as a ranking lever. Lighthouse's Agentic Browsing category checks for it.

Markdown
# codeAmani Labs

> AI-augmented SaaS tools for US businesses, built on Next.js and Stripe.

## Docs
- [Getting started](https://example.com/docs/start.md): Install and first request
- [API reference](https://example.com/docs/api.md): Every endpoint, with examples

## Optional
- [Blog](https://example.com/blog.md): Background articles

Agents

Google's guide also points at browser agents. These read screenshots, the DOM and the accessibility tree, and emerging protocols such as the Universal Commerce Protocol (UCP) let them do more. Semantic HTML and an accessible UI are the practical prep. See web.dev's agent-friendly site UX.

✅ Checkpoint: Search and answer bots are allowed. Training bots follow a written per-project decision. Edge enforcement is on if blocking matters. You know llms.txt does nothing for Google.


7. Measurement

ToolWhat it tells you
Google Search Console: PerformanceClicks, impressions, CTR and position. AI Overviews and AI Mode are counted inside the "Web" search type
Search Console: Generative AI performance reportImpressions of your links in AI Overviews and AI Mode (Discover has its own report). Available to all sites since 2026-08-31. UI and export only; no API is documented
Search Console APIsearchAnalytics.query: up to 25,000 rows per call, an hour dimension with dataState: "hourly_all", and types web/image/video/news/discover/googleNews
Bing Webmaster Tools: AI PerformanceCopilot and Bing AI-summary citations, cited pages and grounding queries. Public preview since 2026-02-10; June 2026 added Intents, Topics, Citation Share and Compare. Doesn't show clicks
Lighthouse / PageSpeed InsightsLab SEO and performance, plus CrUX field data
web-vitalsReal-user LCP, INP and CLS from your own analytics
Rich Results Test / Schema validatorWhether your JSON-LD qualifies for rich results
TypeScript
// Real-user vitals → your endpoint (web-vitals 6.x; use "web-vitals/attribution" to debug causes)
import { onLCP, onINP, onCLS, type Metric } from "web-vitals";
const send = (m: Metric) => navigator.sendBeacon("/vitals", JSON.stringify(m));
onLCP(send); onINP(send); onCLS(send);

Search Console API. Use a Google Cloud service account with the Search Console API enabled, add it as a user on the property, and request scope webmasters.readonly. The full script is examples/search-console.mts. The JSON key is the only secret, so it goes in the vault:

Bash
# .env.local — server-side only, never NEXT_PUBLIC_
GSC_SERVICE_ACCOUNT_JSON={"type":"service_account","client_email":"...","private_key":"..."}
Setting (not secret)ExampleWhere
Search Console propertysc-domain:example.comscript argument / config
IndexNow key32-char hex stringpublic file /<key>.txt + config. Public by design
Site URLhttps://example.commetadataBase, BASE_URL

Track metrics in this order: indexed pages → impressions (incl. AI features) → average position → CTR → conversions. Google reports that clicks from results pages with AI Overviews are "higher quality", meaning visitors spend more time on site, so judge AI traffic by conversions as well as raw clicks.


8. Next.js 16 reference implementation

Next.js 16.4.2 (App Router, the codeAmani default) generates every file and tag natively. What changed since the 15.x-era version of this guide:

VersionChange
15.2generateMetadata can stream after the initial UI. Next.js still sends blocking <head> metadata to HTML-limited bots (default list includes Google's AdsBot/Mediapartners/PageRenderer, Bingbot, Twitterbot and Slackbot). Override with htmlLimitedBots in next.config.ts, or /.*/ to disable streaming
16.0opengraph-image / twitter-image receive params as a Promise. generateSitemaps passes id to sitemap() as a Promise<string>
16.3robots.ts rules accept other for non-standard directives (Content-Signal, Request-Rate, Clean-param), passed through verbatim
TypeScript
// app/layout.tsx — metadataBase + title template + indexable defaults
import type { Metadata } from "next";
export const metadata: Metadata = {
  metadataBase: new URL("https://example.com"),
  title: { default: "codeAmani Labs", template: "%s | codeAmani Labs" },
  description: "AI-augmented SaaS tools built in the US.",
  robots: { index: true, follow: true, googleBot: { "max-image-preview": "large" } },
};
TypeScript
// app/stripe-checkout/page.tsx → per-page metadata
import type { Metadata } from "next";
export const metadata: Metadata = {
  title: "Stripe Checkout in Next.js",
  description: "Server action + verified webhook + idempotent fulfilment, with copy-paste code.",
  alternates: { canonical: "/stripe-checkout" },
  openGraph: { type: "article" }, // og:image comes from a colocated opengraph-image.tsx
  twitter: { card: "summary_large_image" },
};
FileServesExample
app/robots.ts/robots.txt with the AI-crawler policy and Content-Signalexamples/robots.ts
app/sitemap.ts/sitemap.xml with real lastmod, image and hreflang alternatesexamples/sitemap.ts
app/**/opengraph-image.tsxog:image (+ width, height, alt), generated with ImageResponse from next/ogexamples/opengraph-image.tsx
layout.tsx / page.tsxmetadata / generateMetadataexamples/metadata.ts
Server Component <script type="application/ld+json">JSON-LD (escape < as <)examples/jsonld.tsx
app/llms.txt/route.ts or public/llms.txt/llms.txtexamples/llms-txt-route.ts

ImageResponse limits: it supports flexbox and a CSS subset only (no display: grid), with a 500 KB bundle cap that covers JSX, CSS, fonts and images. Generated images are prerendered and cached unless they use request-time APIs. next-sitemap is unnecessary now that sitemap.ts and generateSitemaps exist.


Copy-paste file templates

  • robots.txt / app/robots.ts with AI-crawler policy: §6 and examples/robots.ts
  • sitemap.xml / app/sitemap.ts: §2 and examples/sitemap.ts
  • IndexNow push: examples/indexnow.mts
  • Meta + Open Graph <head> block: §3
  • OG image generator: examples/opengraph-image.tsx
  • JSON-LD (Organization / Article / Breadcrumb / Product): examples/jsonld.tsx
  • llms.txt: §6 and examples/llms-txt-route.ts
  • Search Console report: examples/search-console.mts
  • Pre-launch checklist: reference/checklist.md · AI-crawler cheatsheet: reference/ai-crawlers.md

Troubleshooting

IssueFix
Page not indexedCheck URL Inspection in Search Console. Make sure there's no noindex, the page is in the sitemap, it returns 200, and the CDN/WAF isn't blocking Googlebot
"Blocked by robots.txt" but should be publicRemove the Disallow. Remember robots.txt ≠ noindex
Blocked page still shows in resultsAdd noindex and allow crawling so Google can see the tag
Rich result disappearedCheck the changelog. FAQ (May 2026) and several 2025 types were retired. Otherwise, fix required-property errors
Wrong thumbnailAlign schema.org image and og:image, and set max-image-preview:large
Not appearing in AI Overviews or AI ModeCheck that the page is indexed and snippet-eligible, check Search Console → Settings → Search generative AI isn't set to Exclude, and check that no nosnippet is set
Content shows in AI features despite nosnippetConfirm with URL Inspection that Googlebot sees the tag, then wait for a recrawl (days to months)
Missing from ChatGPT or Claude searchAllow OAI-SearchBot / Claude-SearchBot in robots.txt and in Cloudflare AI Crawl Control or WAF
Bing slow to pick up changesPush the changed URLs through IndexNow
Traffic drop after a core updateCompare dates against the Status Dashboard. Improve content quality. Recovery can come between big updates
OG image relative / brokenSet metadataBase in the root layout

codeAmani notes

  • US-first defaults. codeAmani's users are mostly in the US, so the default market is English (en_US), USD Offer prices, and Stripe-powered product pages. Kenya-targeted projects add hreflang en/sw variants, a LocalBusiness with a Nairobi address, priceCurrency: "KES", and an LCP budget tested on throttled 3G for 2G/3G-heavy audiences (see AFRICAN_MARKET_GUIDE.md). For those projects, M-Pesa replaces Stripe on the payment pages only. SEO mechanics don't change.
  • AI-crawler policy is per project, and written down. By default, allow the search and answer bots (OAI-SearchBot, Claude-SearchBot, PerplexityBot) and allow training. Products with proprietary content (client data, paid docs) disallow the training tokens and enforce the block in Cloudflare AI Crawl Control. Never block Googlebot to avoid AI Overviews. Use the Search Console control instead.
  • AI routing note. Use Claude (our primary provider) to draft and review SEO copy, and OpenAI structured output to generate JSON-LD from CMS data, then validate the result against schema-dts types. Human-edit anything published: Google's scaled-content-abuse policy targets mass-generated pages.
  • llms.txt only where agents read it. Ship it on docs, MCP servers and developer tools (the tech-stack dashboard, for example). Skip it on marketing sites unless it costs nothing.
  • Performance is SEO. Mobile LCP ≤ 2.5 s and field INP ≤ 200 ms are CI gates (see the lighthouse and github guides).
  • Secrets stay server-side. The only SEO secret is the Search Console service-account key (GSC_SERVICE_ACCOUNT_JSON): keep it in the vault and never expose it as NEXT_PUBLIC_. The IndexNow key is public by design. Never put internal URLs, tokens or customer data in metadata, JSON-LD, sitemaps or llms.txt.
  • Run it from WSL with Lighthouse and the chrome-devtools MCP to audit locally before you ship.