Skip to main content
SEO — search engine optimization — is what search engines and link previews show for a storefront page: its title, its description, its preview image, and whether it should be indexed at all. Every storefront resource carries its SEO in an seo object, and you control it through the company API.

The seo object

Every storefront response includes seo with four fields: These are the values the storefront page itself uses, so the API and the rendered page always agree. None of them is ever null.

Values you haven’t set

You don’t have to set SEO. When a field has no SEO value of its own, Fluid fills it from the next source in line: Descriptions are stripped of HTML and cut to 200 characters. On company responses, seo.id tells you where the values come from. A number means the resource has its own SEO settings. null means every value is filled in from the resource or the store.
SEO settings are stored once per resource, in the store’s default language. When you read a resource with another lang, seo is filled from the resource’s translated title, description, and image instead.

When a page is indexable

seo.indexable is true only when nothing is stopping search engines. It’s false when any of these is true:
  • The resource isn’t live — for example a draft, or a scheduled resource before its time. See Visibility, drafts, and scheduling.
  • You opted the resource out by writing indexable: false.
  • The store blocks search engine indexing for the whole storefront.
  • The product isn’t published to the storefront.
A false value means the storefront page tells search engines not to index it.

Set SEO

Write SEO with search_engine_optimizer_attributes on a company create or update. The shape is the same on every resource:
Include id when the resource already has SEO settings. Read it from seo.id on a company response. With id, only the fields you send change. Without it, the request replaces the resource’s SEO settings, and any field you don’t send falls back to its default.
  • Write and read keys differ. You write search_engine_optimizer_attributes and read seo. Sending an seo object in a write returns 422.
  • To remove a custom value, send null for that field. It then falls back as described above.
  • To keep a resource out of search engines, send indexable: false. The resource stays live for shoppers.

Slugs and canonical URLs

A resource’s slug is part of its public URL, and every response returns the full address as canonical_url. You can’t set canonical_url directly — change the slug instead. Changing a slug changes the URL search engines have indexed, so do it sparingly. See Slugs and URLs.

Checklist

  • Give every live resource a clear title and description. They’re the SEO fallbacks.
  • Set SEO values only where the page should read differently in search results than on the page itself.
  • Pin slugs on pages you promote, so a rename doesn’t change their URL.
  • Use indexable: false for pages that should work for shoppers but stay out of search results, such as thank-you or member-only pages.
  • Check seo.indexable on the public slug lookup before you share a URL you expect to be indexed.