BetterStarter logo
BetterStarter
Docs
Features

SEO / AEO

Search engine and answer engine optimization built in.

Docs are in beta — content is improving rapidly. Found something missing? Open an issue on GitHub or reach out on Twitter (X).

BetterStarter includes SEO and AEO (Answer Engine Optimization) support out of the box — for both traditional search engines and AI-powered answer engines like ChatGPT, Perplexity, and Google AI Overviews.

What's Included

  • Sitemap — auto-generated at /sitemap.xml, includes all routes, blog posts, and docs
  • Robots.txt — at /robots.txt with sitemap reference
  • Meta tags — title, description, canonical URL on every page
  • Open Graph — social media preview tags (see Open Graph)
  • Structured data — JSON-LD Schema.org markup for rich results
  • AEO-friendly content — clear headings, concise answers, FAQ schema

Usage

Set SEO metadata in any route:

import { generateSEO } from '@/features/seo'

export const Route = createFileRoute('/my-page')({
  head: () => ({
    meta: generateSEO({
      title: 'My Page Title',
      description: 'A concise description under 160 characters.',
    }),
  }),
})

Sitemap

The sitemap auto-includes all public routes, blog posts, and docs pages. It's submitted automatically when you add it to robots.txt.

To add custom URLs, edit src/routes/sitemap[.]xml.ts.

Submit to Search Engines

After deploying:

  1. Google Search Console — submit https://yourdomain.com/sitemap.xml
  2. Bing Webmaster Tools — same sitemap URL

On this page