1. Home
  2. ChevronRightSEO & Robots
  3. ChevronRightSEO & Robots

SEO & Robots

Automatic sitemap, robots.txt, meta tags, and Open Graph images for search engines and social sharing.

Boltdocs automatically generates SEO metadata for every page. This includes sitemap.xml, robots.txt, canonical URLs, Open Graph tags, and Twitter Cards.


ConfigurationLink

Basic SEOLink

export default defineConfig({
  siteUrl: 'https://docs.example.com',
  seo: {
    indexing: 'all', // 'all' | 'public' | 'none' — see reference below
    thumbnails: {
      background: '/og-image.webp',
    },
  },
})

Robots.txtLink

export default defineConfig({
  robots: {
    rules: [
      {
        userAgent: '*',
        allow: '/',
        disallow: ['/private/', '/draft/'],
      },
    ],
    sitemaps: ['https://docs.example.com/sitemap.xml'],
  },
})

SEO Config ReferenceLink

SeoConfigLink

PropertyTypeDefaultDescription
indexing'all' | 'public' | 'none' | string'all'Controls <meta name="robots"> tag. 'all' and 'public' emit index,follow; 'none' emits noindex,nofollow. Custom strings are emitted verbatim.
thumbnailsThumbnailConfigOpen Graph image settings.
defaultImagestringFallback OG image for pages without frontmatter.

ThumbnailConfigLink

PropertyTypeDescription
backgroundstringPath to background image for OG cards.
theme'light' | 'dark'Theme for auto-generated thumbnails.

Robots Config ReferenceLink

PropertyTypeDescription
rulesRobotRule[]Array of crawling rules.
sitemapsstring[]URLs to sitemap.xml files.

RobotRuleLink

PropertyTypeDescription
userAgentstringTarget user agent (e.g., '*' for all).
allowstring | string[]Paths to allow.
disallowstring | string[]Paths to disallow.
crawlDelaynumberDelay between requests (in seconds).

Auto-Generated FilesLink

sitemap.xmlLink

Generated at build time. Contains all indexed routes with:

  • loc — Full URL
  • lastmod — Last modified date (from git or file mtime)
  • changefreq — Page update frequency
  • priority — Calculated from sidebar position

robots.txtLink

Generated from your robots config. Example output:

User-Agent: *
Allow: /
Disallow: /private/
Sitemap: https://docs.example.com/sitemap.xml

Per-Page SEO OverrideLink

Override global SEO settings in frontmatter:

---
title: Internal Page
seo:
  noindex: true
  og:image: /custom-og.png
  twitter:card: summary
---
PropertyTypeDescription
noindexbooleanAdd noindex meta tag.
og:imagestringCustom Open Graph image.
og:typestringOpen Graph type (default: 'website').
twitter:cardstringTwitter card type.

Open Graph ImagesLink

Boltdocs auto-generates OG images using seo.thumbnails.background. Each page gets a generated image with:

  • Your background image
  • Page title overlaid
  • Site name in corner

Manual OG ImageLink

Override per-page:

---
seo:
  og:image: /assets/my-custom-og.png
---

Or globally:

export default defineConfig({
  seo: {
    defaultImage: '/default-og.png',
  },
})

Canonical URLsLink

Canonical URLs are auto-generated for every page based on siteUrl + page path. This helps consolidate duplicate content issues.


TroubleshootingLink

sitemap.xml missingLink

Ensure siteUrl is set in your config.

Duplicate contentLink

Check canonical URLs in page source. Use permalink frontmatter to set consistent URLs.

OG images not showingLink

Verify seo.thumbnails.background points to a valid image. Check social media card validators:

Last updated on July 27, 2026

Was this page helpful?