Generated banner for SEO Aeo Best Practices
Generated logo for SEO Aeo Best Practices

SEO Aeo Best Practices

SanityOfficialPublished by Sanity

  • Skill
  • Guidelines
  • Business and productivity
  • MIT
  • No issues found

From the author

SEO and AEO best practices for metadata, Open Graph, sitemaps, robots.txt, hreflang, JSON-LD structured data, EEAT, and content optimized for search engines and AI answer surfaces. Use this skill when implementing page SEO, technical SEO, schema markup, international SEO, AI-overview readiness, or improving content for Google, ChatGPT, Perplexity, and similar assistants.
— the description by Sanity

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a unified framework for SEO and Answer Engine Optimization (AEO). It covers technical requirements like structured data, sitemaps, and robots.txt, alongside content quality strategies based on Google's EEAT (Experience, Expertise, Authoritativeness, Trustworthiness) model. It is designed to help creators ensure their content is both discoverable by search engines and authoritative enough to be cited by AI assistants like ChatGPT, Perplexity, and Google AI Overviews.

What it does

  • Provides technical SEO checklists for metadata, sitemaps, and hreflang
  • Offers patterns for implementing JSON-LD structured data
  • Explains how to optimize content structure for AI extraction
  • Details the four pillars of the EEAT quality framework
  • Guides on managing AI crawler access via robots.txt
  • Outlines strategies for YMYL (Your Money or Your Life) content rigor

When to use it

  • When planning or auditing technical SEO implementation
  • When preparing content to be featured in AI-generated summaries
  • When improving author credibility and content trustworthiness signals
  • When implementing schema markup for articles, products, or FAQs
  • When troubleshooting low visibility in search or AI answer surfaces

Advantages

  • Bridges the gap between traditional SEO and modern AI answer engines
  • Provides actionable schema patterns for structured data
  • Offers clear guidance on improving content authority for AI models
  • Includes specific implementation examples for content management systems

Usage examples

“How should I structure my FAQ page to be better understood by AI assistants?”
The agent provides a guide on using FAQ-specific JSON-LD schema and formatting content with direct, concise question-answer pairs.
“What are the EEAT requirements for a medical blog post?”
The agent outlines the necessity of expert review, clear author credentials, and proper citation of primary sources to meet YMYL standards.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/sanity-io/seo-aeo-best-practices/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip seo-aeo-best-practices.zip -d .agents/skills

Documentation by Sanity

SEO & AEO Best Practices

Principles for optimizing content for both traditional search engines (SEO) and AI-powered answer engines (AEO). Includes Google's EEAT guidelines and structured data implementation.

When to Apply

Reference these guidelines when:

  • Implementing metadata and Open Graph tags

  • Creating sitemaps and robots.txt

  • Adding JSON-LD structured data

  • Optimizing content for featured snippets

  • Preparing content for AI assistants (ChatGPT, Perplexity, etc.)

  • Evaluating content quality using EEAT principles

Core Concepts

SEO (Search Engine Optimization)

Optimizing content to rank well in traditional search results (Google, Bing).

AEO (Answer Engine Optimization)

Optimizing content to be selected as authoritative answers by AI systems.

EEAT (Experience, Expertise, Authoritativeness, Trustworthiness)

Google's framework for evaluating content quality.

References

Start with the one reference that matches the task, such as technical SEO, structured data, EEAT, or AI-answer readiness. See references/ for detailed guidance:

  • references/eeat-principles.md — EEAT implementation and author schema

  • references/structured-data.md — JSON-LD patterns (Article, FAQ, Breadcrumb, Product)

  • references/technical-seo.md — Technical SEO checklist (metadata, sitemaps, hreflang, robots.txt)

  • references/aeo-considerations.md — AI/AEO considerations (AI Overviews, crawler management)

Files

references/technical-seo.md

Technical SEO Checklist

Essential technical SEO elements for modern web applications.

Table of Contents

  • Metadata

  • Sitemaps

  • Canonical URLs

  • Redirects

  • Performance

  • Robots.txt

  • International SEO

Metadata

Title Tags
  • Unique per page

  • 50-60 characters

  • Primary keyword near the beginning

  • Brand name at the end (optional)

Meta Descriptions
  • Unique per page

  • 150-160 characters

  • Include call-to-action

  • Contain relevant keywords

Open Graph
<meta property="og:title" content="Page Title" />
<meta property="og:description" content="Description" />
<meta property="og:image" content="https://example.com/image.jpg" />
<meta property="og:url" content="https://example.com/page" />
<meta property="og:type" content="article" />
Sanity + Next.js Implementation
export async function generateMetadata({ params }): Promise<Metadata> {
  const { data } = await sanityFetch({
    query: PAGE_QUERY,
    stega: false,  // Critical: no stega in metadata
  })
  
  return {
    title: data.seo?.title || data.title,
    description: data.seo?.description,
    openGraph: {
      images: data.seo?.image ? [{
        url: urlFor(data.seo.image).width(1200).height(630).url(),
        width: 1200,
        height: 630,
      }] : [],
    },
    robots: data.seo?.noIndex ? 'noindex' : undefined,
  }
}

Sitemaps

Dynamic sitemap from CMS content:

// app/sitemap.ts
import { MetadataRoute } from 'next'

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
  const pages = await client.fetch(`
    *[_type in ["page", "post"] && defined(slug.current) && seo.noIndex != true]{
      "url": select(
        _type == "page" => "/" + slug.current,
        _type == "post" => "/blog/" + slug.current
      ),
      _updatedAt
    }
  `)
  
  return pages.map(page => ({
    url: `https://example.com${page.url}`,
    lastModified: new Date(page._updatedAt),
    // Note: changeFrequency and priority are largely ignored by Google
    // but may be used by other search engines
  }))
}

Canonical URLs

Prevent duplicate content issues:

export async function generateMetadata({ params }): Promise<Metadata> {
  return {
    alternates: {
      canonical: `https://example.com/${params.slug}`,
    },
  }
}

Redirects

CMS-managed redirects:

// next.config.ts
async redirects() {
  const redirects = await client.fetch(`
    *[_type == "redirect" && isEnabled == true]{
      source,
      destination,
      permanent
    }
  `)
  return redirects
}

Performance

Core Web Vitals impact rankings:

  • LCP (Largest Contentful Paint): < 2.5s

  • INP (Interaction to Next Paint): < 200ms

  • CLS (Cumulative Layout Shift): < 0.1

Image Optimization (Next.js example)
  • Use next/image with Sanity URL builder

  • Serve WebP/AVIF formats

  • Implement LQIP blur placeholders

  • Set explicit dimensions

Font Loading (Next.js example)
// Prevent layout shift
import { Inter } from 'next/font/google'
const inter = Inter({ subsets: ['latin'], display: 'swap' })

Robots.txt

# public/robots.txt
User-agent: *
Allow: /
Disallow: /api/
Disallow: /studio/

# AI crawlers — allow or block based on your content strategy
# Uncomment to block specific AI crawlers:
# User-agent: GPTBot
# Disallow: /
# User-agent: ClaudeBot
# Disallow: /
# User-agent: PerplexityBot
# Disallow: /
# User-agent: Google-Extended
# Disallow: /

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

AI crawler considerations: Decide whether AI training crawlers should access your content. Blocking Google-Extended prevents AI training use while still allowing Google Search indexing. Review your policy regularly as this landscape evolves.

International SEO (hreflang)

For multi-language sites, implement hreflang tags to indicate language/region variants:

export async function generateMetadata({ params }: { params: Promise<{ lang: string; slug: string }> }): Promise<Metadata> {
  const { lang, slug } = await params
  return {
    alternates: {
      canonical: `https://example.com/${lang}/${slug}`,
      languages: {
        'en': `https://example.com/en/${slug}`,
        'de': `https://example.com/de/${slug}`,
        'x-default': `https://example.com/en/${slug}`,
      },
    },
  }
}

Include all language variants in sitemaps with hreflang annotations for proper indexing.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Sanity
Publisher
Sanity (Official)
Source
sanity-io/agent-toolkit · skills/seo-aeo-best-practices · commit 3ed3a14
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Sanity.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download seo-aeo-best-practices.zip