SEO & AEO: The Complete Guide to Ranking in Search and AI Answers
September 2026 · Updated regularly
Everything you need to know about SEO (Search Engine Optimization) and AEO (Answer Engine Optimization) — from meta tags to JSON-LD to getting cited by ChatGPT. Built by a developer who did it, not a marketing agency that talks about it.
SEO Fundamentals
SEO is making your site understandable to search engines. Google crawls billions of pages. If yours doesn't clearly communicate what it's about, it gets ignored. Three pillars:
Technical
Can Google find and read your pages?
Sitemaps, robots.txt, meta tags, canonical URLs, page speed, mobile-friendliness, SSL. The plumbing.
Content
Does your content answer real questions?
Depth, originality, E-E-A-T, keyword targeting, freshness. The substance.
Authority
Do other sites vouch for you?
Backlinks, brand mentions, social signals, domain age. The reputation.
New: AEO
Can AI extract and cite your content?
FAQ schema, llms.txt, structured answers, clear definitions. The AI layer.
Technical SEO Checklist
Before writing a single blog post, fix the plumbing. These are the non-negotiable technical requirements for any site that wants to rank.
1. Meta Tags on Every Page
Every HTML page needs these in the <head>:
<title>Your Page Title — Site Name</title>
<meta name="description" content="Clear, compelling summary of what this page covers.">
<link rel="canonical" href="https://example.com/this-page">
<meta property="og:title" content="Your Page Title">
<meta property="og:description" content="Same as meta description.">
<meta property="og:image" content="https://example.com/og-image.png">
<meta property="og:url" content="https://example.com/this-page">
2. sitemap.xml
A machine-readable list of every page you want indexed. Dynamic sites should generate this from the database:
<?xml version="1.0"?>
<urlset xmlns="http://sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
</urlset>
3. robots.txt
Tell crawlers what's public and what's private:
User-agent: *
Allow: /
Disallow: /auth/
Disallow: /api/
Disallow: /admin/
Sitemap: https://example.com/sitemap.xml
4. Internal Linking
Every page should link to 2-3 other pages on your site. Google discovers pages by following links. If a page has no inbound links, it's an orphan — Google may never find it even if it's in your sitemap.
AEO — Answer Engine Optimization
AEO is SEO for AI. When someone asks ChatGPT, Perplexity, or Google's AI Overview a question, the AI pulls from web content to build its answer. Getting cited means getting traffic from a channel that didn't exist two years ago.
Key insight: AI answer engines don't rank pages — they extract facts. Your content needs to be structured so AI can pull clean, quotable answers from it.
How to Optimize for AEO
- █ FAQ Schema: Add FAQPage JSON-LD. AI models parse this directly.
- █ Direct answers first: Start each section with the answer, then explain. Don't bury the lede.
- █ Question-format headings: Use H2/H3 tags that match natural questions ("What is X?" not "About X").
- █ llms.txt: Create a /llms.txt file — a machine-readable summary for AI crawlers.
- █ Cite sources: AI engines prefer content that references data, dates, and specifics over vague claims.
- █ Be the primary source: Original research, first-hand experience, and unique data get cited. Rehashed content doesn't.
SEO vs AEO: Side by Side
SEO
Optimize for rankings
Keywords, backlinks, CTR, position tracking. Success = appearing on page 1 of Google search results.
AEO
Optimize for citations
Structured data, clear answers, FAQ schema, llms.txt. Success = being cited in AI-generated answers.
Structured Data & JSON-LD
JSON-LD is how you speak Schema.org to search engines. It's a <script> tag in your HTML that describes what your page content represents in a machine-readable format.
Common Schema Types
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "What is SEO?",
"acceptedAnswer": {
"@type": "Answer",
"text": "SEO is the practice of..."
}
}]
}
{
"@context": "https://schema.org",
"@type": "Person",
"name": "Developer Name",
"jobTitle": "Full-Stack Developer",
"url": "https://example.com/page/handle",
"image": "https://example.com/avatar.jpg"
}
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "Your Site",
"url": "https://example.com",
"description": "What your site does."
}
Content That Ranks
The formula: Find a question people actually ask. Answer it better than anyone else. Structure it so both humans and machines can parse it.
The Inverted Pyramid
Journalists have used this for a century. Put the answer first, then the detail, then the background. Search engines and AI both reward this structure:
- Lead: Direct answer in 1-2 sentences (this is what AI extracts)
- Body: Supporting detail, examples, edge cases
- Background: Context, history, related topics
E-E-A-T Signals
Google's quality bar, in plain English:
- █ Experience: Show you actually did the thing (screenshots, code snippets, real results)
- █ Expertise: Go deep, not wide. Cover edge cases competitors skip.
- █ Authoritativeness: Get linked to by other reputable sites. Original data helps.
- █ Trustworthiness: HTTPS, real contact info, accurate facts, no misleading claims.
Google measures three things about your page experience:
LCP
< 2.5s
Largest Contentful Paint. How fast the main content loads.
INP
< 200ms
Interaction to Next Paint. How fast clicks respond.
CLS
< 0.1
Cumulative Layout Shift. How much the page jumps around.
How to win at performance: Server-render HTML (no client-side framework overhead), inline critical CSS, lazy-load images, compress everything, serve from the edge. Cloudflare Workers get near-perfect scores by default because the HTML is fully rendered at the CDN.
SEO for Cloudflare Workers
Cloudflare Workers are inherently SEO-friendly because they server-render HTML at the edge. No JavaScript rendering delay. No hydration jank. Google gets exactly what users get.
Workers SEO Recipe
app.get('/page/:id', (c) => {
return c.html(`<html>...fully rendered...</html>`)
})
app.get('/sitemap.xml', async (c) => {
const pages = await c.env.DB.prepare('SELECT slug FROM pages').all()
return new Response(buildSitemapXml(pages), {
headers: { 'Content-Type': 'application/xml' }
})
})
app.get('/og/:slug', async (c) => {
return new ImageResponse(`<div>...</div>`)
})
20 SEO & AEO Questions, Answered
Every question below is marked up with FAQPage schema — Google and AI answer engines can parse these directly.
Test Your SEO Knowledge
10 questions. See if you actually know this stuff or just think you do.
SEO Launch Checklist
Use this before launching any site. Every item is a yes/no — if any are no, fix them first.
Technical
- □ Every page has a unique
<title>
- □ Every page has a unique
<meta name="description">
- □ Every page has a
<link rel="canonical">
- □
/robots.txt exists and allows public pages
- □
/sitemap.xml exists and includes all public URLs
- □ Sitemap submitted to Google Search Console
- □ HTTPS everywhere (no mixed content)
- □ Mobile responsive (test at different widths)
- □ Server-rendered HTML (not client-side only)
Social & Sharing
- □ OG tags on every page (title, description, image, url)
- □ Twitter card tags on every page
- □ OG images are 1200x630px
- □ Test with Twitter Card Validator and Facebook Debugger
Structured Data
- □ JSON-LD WebSite schema on homepage
- □ JSON-LD Person schema on profile pages
- □ JSON-LD FAQPage schema on FAQ/guide pages
- □ Validate with Rich Results Test
AEO / AI Readiness
- □
/llms.txt exists with site summary
- □ FAQ content uses question-format headings
- □ Answers are direct and in the first sentence of each section
- □ Content is original (not rehashed from other sites)
Ongoing
- □ Google Search Console monitored weekly
- □ New pages added to sitemap automatically
- □ Internal links between related pages
- □ Content updated when information changes
- □ Core Web Vitals passing (test here)