SEO Developer Course & Resource Guide

Technology: seo · Category: tooling · Last reviewed: 2026-10-20

Source: https://tech-stack.codeamanilabs.org/guide/seo

Insight:

SEO in late 2026 means one index and many readers. Google's AI Overviews and AI Mode are grounded in the normal Search index: there are no extra technical requirements, and Google says it ignores llms.txt, "chunking" and other AEO/GEO hacks. Ship the basics instead: crawlable HTML, an honest sitemap lastmod, canonicals, Open Graph, and JSON-LD that matches the visible page (FAQ rich results died on 2026-05-07). Keep INP at or under 200 ms. Search Console now has a per-site Search generative AI control and a Generative AI performance report. Bing has its own AI Performance report and takes IndexNow pushes. Decide AI-crawler access per bot. Training tokens (GPTBot, ClaudeBot, Google-Extended) are separate from search and answer bots (OAI-SearchBot, Claude-SearchBot), and robots.txt is a request, not a block. Enforce blocks at the edge with Cloudflare AI Crawl Control.

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

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)

Item Current Source
next 16.4.2 (latest; 16.5 in canary) npm view next version
schema-dts 2.1.0 (2026-10-02) npm
web-vitals 6.2.3 (2026-10-05). onLCP / onINP / onCLS, plus a web-vitals/attribution build npm, GitHub README
google-auth-library 11.3.1 (for the Search Console API) npm
next-sitemap 4.2.3, last published 2023-09-06. Not needed, because app/sitemap.ts covers it npm
Latest Google core update May 2026 core update (21 May, about 12 days). Earlier: March 2026 and December 2025 Search Status Dashboard
Latest Google spam update September 2026 spam update (24 Sep, about 14 days) same
Core Web Vitals LCP ≤ 2.5 s · INP ≤ 200 ms · CLS ≤ 0.1 at p75 web.dev, matching the lighthouse/ guide
Sitemap limits 50,000 URLs or 50 MB uncompressed per file Google build-sitemap docs
IndexNow ≤ 10,000 URLs per POST. Google does not participate indexnow.org

Official Documentation

Resource URL
Google Search Central https://developers.google.com/search/docs
Optimizing for generative AI features https://developers.google.com/search/docs/fundamentals/ai-optimization-guide
AI features and your website https://developers.google.com/search/docs/appearance/ai-features
Search Central changelog https://developers.google.com/search/updates
Google crawlers (incl. Google-Extended) https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers
robots.txt spec (Google) https://developers.google.com/crawling/docs/robots-txt/robots-txt-spec
Build & submit a sitemap https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap
Structured data (Search Gallery) https://developers.google.com/search/docs/appearance/structured-data/search-gallery
Search Console API (searchAnalytics.query) https://developers.google.com/webmaster-tools/v1/searchanalytics/query
Next.js Metadata API https://nextjs.org/docs/app/api-reference/functions/generate-metadata
IndexNow protocol https://www.indexnow.org/documentation
Cloudflare AI Crawl Control https://developers.cloudflare.com/ai-crawl-control/
llms.txt proposal https://llmstxt.org/
Core Web Vitals https://web.dev/articles/vitals
Rich Results Test https://search.google.com/test/rich-results

1. How discovery works in 2026

flowchart LR
  C["Crawl<br/>robots.txt + CDN rules"] --> I["Index<br/>sitemap + clean HTML"]
  I --> R["Rank<br/>relevance + quality + page experience"]
  R --> S["Classic results"]
  I --> G["AI Overviews / AI Mode<br/>RAG over the same index + query fan-out"]
  G --> CT["Cited as a supporting link"]
  C --> X["Other AI engines<br/>OAI-SearchBot · Claude-SearchBot · Bingbot→Copilot"]
  X --> CT

💡 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.

# /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:

<?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

<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:

✅ 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.

<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)

Status Types
Gone FAQPage 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 it Article · 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:

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:

Metric Good Needs improvement Poor Measures
LCP ≤ 2.5 s ≤ 4.0 s > 4.0 s Loading
INP ≤ 200 ms ≤ 500 ms > 500 ms Responsiveness (replaced FID on 2024-03-12)
CLS ≤ 0.1 ≤ 0.25 > 0.25 Visual 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.

# 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:

Controls, from lightest to heaviest:

You want to… Use Notes
Limit what's quoted nosnippet, data-nosnippet, max-snippet applies to AI Overviews and AI Mode as well as snippets
Leave AI Overviews, AI Mode and Discover gen-AI but stay in Search Search Console → Settings → Search generative AI → Exclude rolled 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 grounding User-agent: Google-Extended + Disallow a robots.txt token only, with no separate fetcher. Doesn't affect Search, AI Overviews or ranking
Leave Google entirely noindex —

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)

Token Vendor Purpose Obeys robots.txt? Default stance
OAI-SearchBot OpenAI surfaces sites in ChatGPT search yes allow
GPTBot OpenAI foundation-model training yes per project
ChatGPT-User OpenAI user-initiated fetches, GPT Actions "may not apply" n/a
OAI-AdsBot OpenAI checks landing pages submitted as ChatGPT ads only visits ad pages n/a
Claude-SearchBot Anthropic improves Claude search results yes allow
ClaudeBot Anthropic training yes (+ Crawl-delay) per project
Claude-User Anthropic fetches pages when a user asks Claude yes allow
PerplexityBot Perplexity Perplexity search results, not training yes, per its docs allow
Perplexity-User Perplexity user-initiated fetches "generally ignores" robots.txt n/a
Google-Extended Google Gemini training and grounding yes (token only) per project
Applebot-Extended, CCBot, meta-externalagent, Bytespider, Amazonbot Apple, Common Crawl, Meta, ByteDance, Amazon mostly training varies per 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.

# 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:

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.

# 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

Tool What it tells you
Google Search Console: Performance Clicks, impressions, CTR and position. AI Overviews and AI Mode are counted inside the "Web" search type
Search Console: Generative AI performance report Impressions 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 API searchAnalytics.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 Performance Copilot 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 Insights Lab SEO and performance, plus CrUX field data
web-vitals Real-user LCP, INP and CLS from your own analytics
Rich Results Test / Schema validator Whether your JSON-LD qualifies for rich results
// 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:

# .env.local — server-side only, never NEXT_PUBLIC_
GSC_SERVICE_ACCOUNT_JSON={"type":"service_account","client_email":"...","private_key":"..."}
Setting (not secret) Example Where
Search Console property sc-domain:example.com script argument / config
IndexNow key 32-char hex string public file /<key>.txt + config. Public by design
Site URL https://example.com metadataBase, 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:

Version Change
15.2 generateMetadata 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.0 opengraph-image / twitter-image receive params as a Promise. generateSitemaps passes id to sitemap() as a Promise<string>
16.3 robots.ts rules accept other for non-standard directives (Content-Signal, Request-Rate, Clean-param), passed through verbatim
// 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" } },
};
// 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" },
};
File Serves Example
app/robots.ts /robots.txt with the AI-crawler policy and Content-Signal examples/robots.ts
app/sitemap.ts /sitemap.xml with real lastmod, image and hreflang alternates examples/sitemap.ts
app/**/opengraph-image.tsx og:image (+ width, height, alt), generated with ImageResponse from next/og examples/opengraph-image.tsx
layout.tsx / page.tsx metadata / generateMetadata examples/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.txt examples/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

Troubleshooting

Issue Fix
Page not indexed Check 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 public Remove the Disallow. Remember robots.txt ≠ noindex
Blocked page still shows in results Add noindex and allow crawling so Google can see the tag
Rich result disappeared Check the changelog. FAQ (May 2026) and several 2025 types were retired. Otherwise, fix required-property errors
Wrong thumbnail Align schema.org image and og:image, and set max-image-preview:large
Not appearing in AI Overviews or AI Mode Check 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 nosnippet Confirm with URL Inspection that Googlebot sees the tag, then wait for a recrawl (days to months)
Missing from ChatGPT or Claude search Allow OAI-SearchBot / Claude-SearchBot in robots.txt and in Cloudflare AI Crawl Control or WAF
Bing slow to pick up changes Push the changed URLs through IndexNow
Traffic drop after a core update Compare dates against the Status Dashboard. Improve content quality. Recovery can come between big updates
OG image relative / broken Set metadataBase in the root layout

codeAmani notes

Official docs: