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:
config/meta.jsonrouteMeta, thenpages, for the page’s exact path. This is your code’s per-page override.- The Site’s SEO settings, from the admin, Mist or the API.
config/meta.jsondefault.- The Site’s own title, description and image, then your store’s defaults.
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
- Head tags in
index.html: the title, description, Open Graph tags and Twitter card. A title fromconfig/meta.jsonreplaces the page’s<title>. With no title, the page keeps its own. - One
index.htmlper route, such asevents/index.html, with that route’s own tags. Routes come fromroutes, plus any plainpath: "/…"literal insrc/router.tsorsrc/routes.ts. The Site serves a route’s own file before the single-page app fallback. - Page content. With the
prerenderoption, a module that exportsrender(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 whenconfig/meta.jsonhas an absoluteurl. A sitemap needs absolute addresses.
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: truewith the API; - your store doesn’t block indexing for the whole storefront.
config/meta.json can’t turn it on.
What the Site’s host sends:
X-Robots-Tag: noindex, nofollowon 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 ownrobots.txt, or on its standalone host a generated one that allows everything and names the sitemap.sitemap.xmlandllms.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 fromroutesinconfig/meta.json.- A canonical
Linkheader 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.
sitemap-sites.xml lists its live company Sites. See SEO and the page head.