# SEO

How Docsheaf presents your pages to search engines and link previews — and what you can change.

Public sites are ready for search engines: every page carries its title, description, canonical URL
and structured data, and the site serves a sitemap and `robots.txt` on its own address.

A new docs site starts **hidden from search engines**, so nothing is indexed while you're still
writing it. When it's ready, turn on **Let search engines index this site** in **Customize → SEO &
analytics**. Knowledge bases start with indexing on.

## What Docsheaf does for you

- **One canonical address.** A site answers on several hosts — its `docsheaf.io` subdomain, your custom
  domain, the app. Pages name one of them as canonical: the custom domain when it's active, otherwise
  the subdomain.
- **`sitemap.xml`** lists every indexable page with the date it last changed, and language alternates
  for [language variants](site-structure#variants-versions-and-languages).
- **`robots.txt`** allows search engines and AI crawlers.
- **Structured data** — `TechArticle` and breadcrumbs on pages (`Article` in knowledge bases), and a
  `WebSite` entry on the home page.
- **Social previews** — Open Graph and Twitter cards. The image is the page's cover, else your site's
  social image, else a card Docsheaf draws with your color, logo, the page title and its summary.

## Settings

Open **Customize → SEO & analytics**.

| Setting | Effect |
| --- | --- |
| Let search engines index this site | Off makes every page `noindex`, `robots.txt` disallow everything and the sitemap empty. Readers still open the site. Off for a new docs site, on for a new knowledge base. |
| Favicon | Replaces the emoji icon in browser tabs. Upload a square PNG or SVG. |
| Social image | The default preview image for pages without a cover. Upload a 1200 × 630 PNG or JPG. |
| Google / Bing verification | Adds the ownership meta tag. Paste the code or the whole `<meta>` tag. |
| Google Analytics / Tag Manager | Loads your own tags for readers, never in previews. Collecting consent is up to you. |

To keep a single page out of search engines, choose **Hide from search engines** in its menu in the page
tree. It stays in the site's own search and navigation.

## What's never indexed

Sites shared with a link, members-only sites, change request previews, search result pages, and pages
marked no index.

{% hint style="info" %}
Docsheaf's own [Insights](insights) work without cookies, whether or not you add
analytics tags.
{% endhint %}
