Skip to main content
A Site’s title, description and share image come from its SEO settings, set in the Fluid admin, in Mist or with the API. config/meta.json in your code overrides them only on the pages it names. Search engines don’t index a Site until someone turns indexing on in its SEO settings.

Where to set a Site’s SEO

These settings exist for company Sites, which are storefront resources. A member’s own Site has no SEO settings and is never indexed.

Which value wins

The storefront writes the head of each page around your Site: the <title>, the meta description, the Open Graph and Twitter tags and the canonical link. Crawlers and link previews read these, never your Site’s frame. Each field comes from the first source that has one:
  1. config/meta.json routeMeta, then pages, for the page’s exact path. This is your code’s per-page override.
  2. The Site’s SEO settings, from the admin, Mist or the API.
  3. config/meta.json default.
  4. The Site’s own title, description and image, then your store’s defaults.
So what someone sets in the admin shows on every page your code doesn’t name, even when config/meta.json has a default. To make the code win on a page, name that page in routeMeta or pages. To let the SEO settings decide everywhere, leave config/meta.json as {}, as the template does. The canonical link is the Site’s /home/sites/<handle> address on your store, followed by the page’s path, such as https://yoli.com/home/sites/diamond-leaders/events.

The page metadata file

config/meta.json holds your code’s page metadata. Every member is optional, so {} is a valid file.
config/meta.json
A title is 1 to 200 characters and a description at most 500. An image is a file of your build, such as /og.png, or an https:// address with no credential in its query. fluid sites lint warns a company Site that has no title or description in config/meta.json, or no routes and no prerender entry. The first warning is fine when the Site’s SEO settings set the title and description.

Add SEO at build time with fluidSite()

A Site is usually a single-page app, so a crawler that doesn’t run JavaScript sees an empty page. fluidSite() from @fluid-app/sites/vite runs after vite build and writes what crawlers read. The template already has it:
vite.config.ts
It writes into the build:
  • Head tags in index.html: the title, description, Open Graph tags and Twitter card. A title from config/meta.json replaces the page’s <title>. With no title, the page keeps its own.
  • One index.html per route, such as events/index.html, with that route’s own tags. Routes come from routes, plus any plain path: "/…" literal in src/router.ts or src/routes.ts. The Site serves a route’s own file before the single-page app fallback.
  • Page content. With the prerender option, a module that exports render(path), each page’s HTML goes inside the root element. Without it, each page gets a <noscript> with its title and description.
  • llms.txt, listing the home page and every route.
  • sitemap.xml, only when config/meta.json has an absolute url. A sitemap needs absolute addresses.
A route that routeMeta marks noindex gets <meta name="robots" content="noindex"> and is left out of sitemap.xml and llms.txt. A config/meta.json that breaks these rules fails the build, naming the field. At build time a route’s tags come from routeMeta, then pages, then default. On the storefront, the SEO settings sit between pages and default, as above.

Indexing

Search engines may index a Site only when all of these hold:
  • it’s a company Site, not a member’s Site and not a branch;
  • it’s public, switched on, not taken down, and published;
  • indexing is turned on in its SEO settings: Show in search engines in the admin or Mist, or indexable: true with the API;
  • your store doesn’t block indexing for the whole storefront.
Indexing is off for every new Site until someone turns it on. config/meta.json can’t turn it on. What the Site’s host sends:
  • X-Robots-Tag: noindex, nofollow on every answer of a Site that isn’t indexable.
  • robots.txt. For a Site that isn’t indexable, one that disallows everything, whatever the build ships. For an indexable Site, the build’s own robots.txt, or on its standalone host a generated one that allows everything and names the sitemap.
  • sitemap.xml and llms.txt. None for a Site that isn’t indexable: they answer not found. For an indexable Site, the build’s own files, or on its standalone host files generated from routes in config/meta.json.
  • A canonical Link header on each page of a standalone Site, naming the page’s storefront address. For a company with no storefront, the standalone address is the canonical one.
Your store’s sitemap-sites.xml lists its live company Sites. See SEO and the page head.