5.5.5
Search and AI
What Dispatch gives search engines and AI tools, how locked stories stay locked, and how to turn away AI training crawlers.
Dispatch is ready for search engines and AI search out of the box. This page lists what ships and what you can change.
Set your address first
The links in the sitemap, the feed, robots.txt, llms.txt, the share cards and the structured data are full addresses. They come from your site’s public address. Set the SITE_URL environment variable, or the site line in astro.config.mjs. See Deploy. Until you set it, a static build’s point at https://example.com, and an EmDash server’s use the address the server sees for each request, usually http://localhost.
What ships
Every public page has:
- A title and a description, a canonical link, and the tags that social sites read.
- A share card: an image made for the page, shown when someone shares the link.
- Structured data (JSON-LD). It tells search engines what the page is, in the schema.org format.
The canonical link points at the page’s own address. It tells search engines which address is the main one. In EmDash, an entry’s SEO panel can point it somewhere else. See EmDash.
The site also has:
/sitemap.xml: every public page./rss.xml: the newest 50 stories, each with its public excerpt. The feed never holds a story’s text./robots.txt: lets every crawler in and points at the sitemap./llms.txt: a plain list of the public pages. See llms.txt.
Structured data
Every page names the site (a WebSite) and your publication (an Organization). The publication has its name, logo and social links, from content/site.json. With no logo, it has no logo field. The share card is never used as the logo.
Each page then says what it is:
- A story is a
BlogPosting, with its title, excerpt, photo and dates. Its writers are each aPerson. With no writers, the author is the publication. A story in a series is part of that series. - A writer’s page is a
ProfilePageabout aPerson, with the writer’s role, photo, bio and links. - The archive, the section pages and the series pages are each a
CollectionPage. - Plans, Subscribe and other pages, such as About, are a
WebPage.
You do not need to fill in anything. The data comes from the content you already have.
Members and paid stories
A members or paid story’s structured data holds only its public fields: the title, the public excerpt, the photo, the dates, the writers and the series. It never holds the story’s text or its word count.
It also marks the story as not free to read (isAccessibleForFree: false). This is how Google expects paywalled articles to be marked. The mark follows the story’s access, not the reader. So a paid story says “not free” even to a signed-in member who can read it. A public story says it is free.
The locked text is never in the public page, the feed or the sitemap. The sitemap lists a locked story’s address, so search engines can find its public view. llms.txt leaves locked stories out.
Hide a page
Set noindex: true on a story, a writer, a series or a page:
---
title: A note for this week only
noindex: true
---
The page still builds and its link still works. But it asks search engines not to list it. It has no structured data, and it is left out of the sitemap, llms.txt, the feed and site search.
To leave an entry out of the site completely, use draft: true instead.
llms.txt
/llms.txt lists the site’s public pages in the llmstxt.org format. It starts with your publication’s name and tagline. Then it groups the pages by kind, under the headings Pages, Letters, Sections, Writers and Series. Pages holds the main pages, such as About. Letters holds the public stories. Each line has the page’s title, its full address and, where it has one, its excerpt.
It is a map for a coding assistant or other AI tool that someone sends to your site, so the tool can see which pages you have. No tool has to read it, and it promises no results. It does not raise your search rank. Search engines do not use it to rank pages.
Hidden pages and locked stories are never in it. It never holds a story’s text.
Block AI training crawlers
By default, robots.txt lets every crawler in. Some crawlers collect pages to train AI models. To ask them to stay off your site, open src/pages/robots.txt.ts and change the line at the top:
export const AI_TRAINING = false;
robots.txt then adds this group:
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: CCBot
User-agent: Applebot-Extended
Disallow: /
These are the training crawlers of OpenAI, Anthropic, Google, Common Crawl and Apple. Only training is turned away. The crawlers that answer searches stay allowed, such as Googlebot, Bingbot, OAI-SearchBot, Claude-SearchBot and PerplexityBot. So your publication still shows in search results and in AI search answers.
Google-Extended does not change how Google Search lists your site.
What robots.txt cannot do
robots.txt is a request, not a lock. Well-known crawlers follow it, but nothing makes a crawler read it.
- When a person asks an AI chat tool to read one of your stories, the tool fetches it for that person, like a browser. Such fetches may not read
robots.txtat all. They get the same public view as anyone else, so a locked story stays locked. - It does not remove pages a crawler has already collected.
- Anyone can still open your public pages.
To block crawlers for real, use your host’s bot settings. Cloudflare, for example, can block AI crawlers at its edge.
Dates
A story’s optional updated date counts as its last change when it is on a later day than date. The story page then shows “Updated” and that date. The sitemap and the structured data use it too. Leave it out, and they use date. In EmDash, it is the story’s “Last updated” field.
EmDash
With the EmDash source, everything on this page works the same way. A few notes:
- The theme writes the structured data. EmDash’s own site block is off, so each page has one
WebSite, not two. - Plugins that add their own structured data still work. On a locked story, plugins never see the story.
- The SEO panel’s title, description and image fill the page’s title, description and share tags. Its “Hide from search engines” switch works as
noindex: truedoes. Its “Canonical URL” replaces the page’s canonical link, and the structured data uses that address too. - The theme owns
robots.txtand the sitemap, so EmDash’s robots setting in the admin does not apply. Editsrc/pages/robots.txt.tsinstead. On a server build,robots.txtalso keeps crawlers out of/_emdash/. - The “not free” mark is the same for every reader. A member who can read a paid story still gets it.
- Search engines and caches always get the public view. Pages for signed-in readers are never cached. But a signed-in reader’s own page may take its description from the text that reader can read.