Skip to content

SEO & AI Search ​

Published pages are server-rendered with no client-side JavaScript, so every crawler — Googlebot, GPTBot, ClaudeBot, PerplexityBot — sees the full content on the first request. Nothing on this page needs configuration to work; it describes what you get by default and which knobs exist if you want them.

What's automatic ​

Every published page emits, with no configuration:

  • A per-page <title> (the homepage is titled with the site name alone) and <meta name="description">
  • A self-referential <link rel="canonical">
  • A robots meta: index, follow, max-image-preview:large on indexable pages, noindex, follow otherwise
  • Open Graph tags (og:title, og:description, og:image + og:image:alt and, for uploaded images, og:image:width/og:image:height, og:url, og:type, og:locale in Open Graph's language_TERRITORY form such as ar_AR, and an og:locale:alternate per other language)
  • A twitter:card (large image when a share image is set) with twitter:image:alt, plus twitter:site when the site's X profile URL is set
  • hreflang alternates for every indexable locale a multi-locale site serves, including x-default — the same rule the sitemap uses. A page with a canonical override pointing elsewhere emits no hreflang, and alternate URLs carry only the locale parameter (tracking parameters such as utm_* never leak into them)
  • JSON-LD structured data: WebPage on every page (datePublished from the page's creation, dateModified from the published revision, linked to the site's #website and #organization by @id), plus WebSite and Organization on the homepage (at the site's home URL), BreadcrumbList for nested slugs, Product on dynamic product pages, BlogPosting on article record pages, FAQPage from any FAQ section, LocalBusiness per block of a Locations section (with geo when the coordinates parse), and VideoObject for a Video section that has a cover image

When a page has no description of its own, FilamentCraft uses the first meaningful text on the page (a hero subheading, an intro, a rich-text body — tags stripped and cut at a word boundary around 155 characters) before the site default. The share image falls back the same way: the page's image, then the first section image, then the site default.

Dynamic record pages ​

A dynamic template serves many URLs from one page (/products/{product}). Each record URL gets its own SEO: the canonical, og:url and the Product offer URL are the URL actually served, and the title, description, share image and og:type come from the record. For a page with a Product detail section this is automatic — the bound catalog product supplies them. For any other record, return a RecordSeo from the definition's seo() hook:

php
use FilamentCraft\Enums\OgType;
use FilamentCraft\Routing\DynamicTemplateDefinition;
use FilamentCraft\Routing\RenderContext;
use FilamentCraft\Seo\RecordSeo;

DynamicTemplateDefinition::make('posts.show')
    ->path('blog/{post}')
    ->templateSlug('post')
    ->bind('post', fn ($site, string $slug) => Post::firstWhere('slug', $slug))
    ->seo(fn (RenderContext $context) => new RecordSeo(
        title: $context->binding('post')->title,
        description: $context->binding('post')->excerpt,
        image: $context->binding('post')->cover_url,
        ogType: OgType::Article,
    ));

The title gets the site name appended (Post title — Site) unless the site's title suffix is off. To use it exactly as written, pass exactTitle: true.

For a paginated record page (a category listing, for example), pass paginated: true and pages 2 and up keep their ?page=N in the canonical and hreflang links. Other query parameters such as filters and sorting are always dropped, and a record without the flag ignores ?page.

On a multilingual site, pass locales with the languages the record is translated in, and its hreflang links skip the others (and x-default when the default language is missing). Leave it null to list every site language:

php
new RecordSeo(title: $post->title, locales: $post->translatedLocales());

The dynamic template's own slug (/post above) stays reachable for previews but answers noindex, and is never listed in the sitemap or submitted to IndexNow.

A record with ogType: OgType::Article also emits BlogPosting JSON-LD and article:published_time. Pass author, authorUrl, publishedAt and modifiedAt to fill the author and dates Google's article guidelines ask for:

php
new RecordSeo(
    title: $post->title,
    image: $post->cover_url,
    ogType: OgType::Article,
    author: $post->author->name,
    authorUrl: route('authors.show', $post->author),
    publishedAt: $post->published_at,
    modifiedAt: $post->updated_at,
);

Product structured data ​

The Product block carries what Google's merchant listing and product snippet reports look for, read from the catalog's ProductData: every image, the description as plain text, the offer price and currency, availability, and the rating. Sale pricing (a compareMinor above the price) adds a StrikethroughPrice. Identifiers come from ProductData::$meta when the catalog supplies them:

meta keyEmits
brandbrand (Brand)
sku, mpnsku, mpn (skipped when they contain whitespace)
gtingtin (8, 12, 13 or 14 digits only)
price_valid_until or sale_ends_atpriceValidUntil, on sale prices
updated_atthe product's sitemap lastmod

Shipping and returns are store policy, not product data, so add them with one hook — the array is merged into every Offer:

php
use FilamentCraft\Seo\JsonLd;

JsonLd::offerDetailsUsing(fn (ProductData $product, Site $site): array => [
    'shippingDetails' => [
        '@type' => 'OfferShippingDetails',
        'shippingRate' => ['@type' => 'MonetaryAmount', 'value' => 0, 'currency' => 'USD'],
        'shippingDestination' => ['@type' => 'DefinedRegion', 'addressCountry' => 'US'],
    ],
    'hasMerchantReturnPolicy' => [
        '@type' => 'MerchantReturnPolicy',
        'applicableCountry' => 'US',
        'returnPolicyCategory' => 'https://schema.org/MerchantReturnFiniteReturnWindow',
        'merchantReturnDays' => 30,
    ],
]);

ProductData::$variants holds only option names (no per-variant price or SKU), so variants are not emitted as a ProductGroup.

Hosts that render their own dynamic pages through <x-filamentcraft::layout> (cart, checkout, account) get the site-level defaults automatically, defaulting to noindex for those utility pages.

Per-page SEO ​

In the editor, open the Settings cog in the topbar and choose SEO — the modal has two tabs.

The SEO modal's Search engine tab, showing the live SERP preview, character counters, indexing toggle and canonical override

Search engine shows a live Google-style preview that updates as you type, character counters against the recommended lengths (~60 for the title, ~155 for the description), a canonical URL override for the rare page that duplicates another URL, and one indexing switch:

Show this page in search engines controls the noindex robots meta and whether the page appears in the sitemap — a single toggle, so the two can never disagree.

The preview renders the real snippet — site monogram, breadcrumb path, and the truncation searchers will actually see:

A close-up of the live SERP preview inside the SEO modal

Social shows a share-card preview. By default it reuses the search title and description ("Use the search title & description for social too"); uncheck it to write dedicated Open Graph copy. Upload a per-page share image or fall back to the site default.

The Social tab, showing the 1200 × 630 share-card preview and the image uploader

All per-page SEO is stored per locale — translating a page translates its metadata too. The modal names the language you're editing. A translation never borrows the default language's title, description, social copy or canonical override; only the share image and the Show this page in search engines switch carry over until you change them for that language.

Below the preview, an SEO checklist audits the page as you type: title length (30–60 characters), description length (70–160), whether a share image is set or falls back, a noindex page or site, a canonical pointing at another URL, which other languages lack their own SEO title or description, and whether exactly one built-in section (Hero, Store hero, Product detail, Cart, Checkout) gives the page its main <h1>.

Redirects when a slug changes ​

Slugs live in Page settings, not the SEO modal — both sit under the same topbar Settings cog. Change a slug there and the form offers "Redirect the old URL to the new one" (checked by default). Accepting it creates a 301 from the old path to the new one, so existing links and search rankings keep working. Chained redirects are collapsed automatically — visitors never make two hops. Redirects are served by FilamentCraft's own public routes (the catch-all and the tenant route) when no page matches the path; pages your own controllers render don't check them.

Site-wide defaults ​

Site settings → Search & AI sets the defaults every page inherits:

  • Whether to append the site name to page titles
  • A default meta description (used for the default language only, so a translation never shows copy in another language) and a default social share image
  • An organisation logo and social profile URLs (these become sameAs links in the Organization structured data — the entity signals AI engines weigh heavily)
  • A site-wide "Allow search engines to index this site" switch — turn it off for staging to add a blanket noindex. Pages then carry a noindex robots meta and an X-Robots-Tag: noindex header, the sitemap is empty, and IndexNow is skipped. robots.txt deliberately keeps the site crawlable: a Disallow: / would stop crawlers from ever seeing the noindex, so already-linked URLs could stay in the index

AI crawlers & GEO ​

The AI crawler policy decides which AI bots may access the site. The presets are built around one distinction: search/answer bots and training bots are separate levers.

  • Answer bots (OAI-SearchBot, ChatGPT-User, PerplexityBot, Claude-SearchBot, and Google's own Googlebot, which powers AI Overviews) are what put you in AI answers. FilamentCraft never blocks these — blocking them just removes you from AI search.
  • Training bots (GPTBot, ClaudeBot, Google-Extended, CCBot, …) feed model training. Blocking them never removes existing citations, so they are the only bots a policy toggles.
PresetEffect
Maximum AI visibility (default)Everything allowed except Bytespider (which ignores robots.txt)
Protect content from trainingTraining bots blocked; answer bots still allowed
Custom per-bot rulesTick exactly which training crawlers may access the site

This renders into robots.txt for you. Two more toggles live here: Publish llms.txt and Notify IndexNow when pages are published. The modal also links to the site's sitemap and robots.txt, and warns when public_routes is off or a static file in public/ shadows them.

The AI crawlers & GEO modal, showing the crawler policy select plus the llms.txt and IndexNow toggles

Public files ​

When public routing is enabled, FilamentCraft serves these per site:

PathWhat it is
/sitemap.xmlPublished, indexable pages with honest lastmod, plus every record URL a dynamic template serves. On a multi-language site every language URL is its own entry with inline hreflang alternates, judged by that language's own Indexable setting — a language marked noindex is left out and never listed as an alternate, and so is a page whose canonical override points at another URL. Each entry lists the images the page renders as <image:image> tags. No priority/changefreq (Google ignores them). With a custom locale URL resolver each language URL comes from the resolver, which is called inside a request for that page: read the page through request() (or the Request facade), not a request captured earlier. A resolver that still answers with the sitemap's own URL falls back to ?locale= alternates for that page. Past 50,000 URLs or about 49 MB it becomes a sitemap index over /sitemap-1.xml, /sitemap-2.xml…
/robots.txtThe AI-crawler policy plus a Sitemap: line (a staging site stays crawlable so its noindex is seen)
/llms.txtAn llmstxt.org index of your pages
/{key}.txtThe IndexNow verification key

Delete the stock public/robots.txt

A fresh Laravel app ships a static public/robots.txt. Your web server serves that file before the request ever reaches Laravel, so it silently shadows FilamentCraft's dynamic /robots.txt (and a stray public/sitemap.xml would shadow the sitemap the same way). Delete those static files so the per-site, AI-crawler-aware versions take effect.

Each can be turned off in config:

php
// config/filamentcraft.php
'seo' => [
    'sitemap' => true,
    'robots_txt' => true,
    'llms_txt' => true,
    'indexnow' => ['enabled' => true, 'endpoint' => 'https://api.indexnow.org/indexnow'],
],

IndexNow submits each page to Bing, Yandex, Naver and Seznam the moment it's published — and Bing's index feeds ChatGPT Search and Copilot. Google does not consume IndexNow, so it complements the sitemap rather than replacing it. It's fire-and-forget: it never blocks a publish and skips non-public hosts (localhost, IP addresses and reserved domains such as .test and .local), sites that aren't live or are set not to be indexed, noindex pages, pages canonicalised elsewhere, and dynamic-template skeletons. It needs public_routes on, because the key file is served by those routes; path-mounted tenants sharing a host all verify through the host root.

An honest note on llms.txt

As of 2026 no major AI provider has committed to reading llms.txt, and most files in the wild get zero AI requests. It ships because it is cheap and harmless — not because it is a proven ranking lever. Your server-rendered HTML is what AI crawlers actually read.

If public routing is off, the host app owns these paths — FilamentCraft won't register them.

Path-mounted tenant sites ​

Route::filamentCraftTenant(...) also registers /{tenant}/sitemap.xml (and its /{tenant}/sitemap-{n}.xml children) for each tenant's live site, honouring the same seo.sitemap config and the site's indexing switch. Pass sitemap: false to skip them. Entries use your PublicUrlResolver — without one they point at the auth-gated preview URL, which filamentcraft:doctor flags.

Crawlers only read robots.txt at the host root, so list every site there through a root sitemap index. SitemapIndex::for() skips sites that aren't live, are set not to be indexed, or have no published homepage:

php
use FilamentCraft\Models\Site;
use FilamentCraft\Seo\SitemapIndex;

Route::get('sitemap.xml', fn () => response(
    SitemapIndex::for(Site::query()->live()->get()),
    200,
    ['Content-Type' => 'application/xml; charset=UTF-8'],
));

Route::get('robots.txt', fn () => response(
    "User-agent: *\nAllow: /\n\nSitemap: ".url('sitemap.xml')."\n",
    200,
    ['Content-Type' => 'text/plain; charset=UTF-8'],
));

SitemapIndex::urlFor($site) returns a single site's sitemap URL (or null) if you build the index yourself. List only sitemaps on the same host: a site on its own domain belongs in that domain's robots.txt.

To keep FilamentCraft's own /robots.txt (and its AI-crawler rules) instead of replacing the route, register the sitemap URLs it should list. The callback receives the site serving the request and replaces the default Sitemap: line; null entries are skipped and nothing is listed while seo.sitemap is off:

php
use FilamentCraft\Models\Site;
use FilamentCraft\Seo\RobotsTxt;
use FilamentCraft\Seo\SitemapIndex;

// AppServiceProvider::boot()
RobotsTxt::sitemapsUsing(fn (Site $site): array => SitemapIndex::urls(Site::query()->live()->get()));

To add your own crawl rules to the User-agent: * group, register a rules callback. It receives the site serving the request and returns Allow, Disallow or Crawl-delay lines; anything else is dropped, and nothing is added while the site's indexing is off:

php
use FilamentCraft\Models\Site;
use FilamentCraft\Seo\RobotsTxt;

// AppServiceProvider::boot()
RobotsTxt::rulesUsing(fn (Site $site): array => ['Disallow: /*?sort=*', 'Allow: /cart']);

The sitemap is cached in the fragment cache store (tagged stores only, for cache.ttl seconds) and flushed whenever a page is published (from the editor or from code) or its SEO settings are saved. Catalog changes show up when the cache expires.

Sitemap entries for record pages ​

A dynamic definition routed by {product} alone, whose page has a Product detail section, lists every product of that section's catalog automatically — with each product's images and, when the catalog sets meta['updated_at'], its lastmod. For any other record, return SitemapEntry objects from the definition's sitemap() hook (a relative URL is mounted on the site's root):

php
use FilamentCraft\Seo\SitemapEntry;

DynamicTemplateDefinition::make('posts.show')
    ->path('blog/{post}')
    ->templateSlug('post')
    ->sitemap(fn (Site $site) => Post::query()->published()->get()->map(
        fn (Post $post) => new SitemapEntry('blog/'.$post->slug, $post->updated_at, [$post->cover_url]),
    ));

Record URLs are left out while the record template itself is set to noindex.

Extending it ​

  • Add any other URLs to the sitemap with a closure (each entry may also carry an images list):

    php
    use FilamentCraft\Seo\SitemapBuilder;
    
    SitemapBuilder::appendUsing(fn ($site) => Product::query()
        ->get()
        ->map(fn ($p) => ['loc' => route('products.show', $p), 'lastmod' => $p->updated_at->toAtomString()]));
  • Override or add head tags by pushing to the fc-head stack from any page that wraps the layout — your pushes render after FilamentCraft's tags, so they win.

  • Point canonicals at your own routing by registering a PublicUrlResolver closure — the canonical URL, og:url, and sitemap entries all follow it.

Diagnostics ​

php artisan filamentcraft:doctor audits SEO too, in every locale: pages missing a description, duplicate titles (compared as rendered, ignoring noindex pages) and descriptions, missing default share images, staging sites set to noindex, tenant routes with no public URL resolver, and whether the public SEO files are being served (including a static public/robots.txt, sitemap.xml or llms.txt shadowing them).