Back to Blog
Strapi CMS

Building SEO and Structured Data Fields in Strapi

Model titles, descriptions, canonicals, robots directives, social metadata, and supported JSON-LD in Strapi.

Terry Hunt
August 23, 2026
6 min read

I give editors useful SEO controls without asking them to hand-author every technical tag. The content record stores a focused title, description, canonical choice, robots directive, and social copy. The frontend generates stable defaults and structured data from verified fields.

Strapi's component model lets an SEO field group repeat across content types. I keep JSON-LD support bounded because arbitrary schema pasted into a JSON field can contradict the visible page.

Separate editable fields from generated facts

Editors can write a meta title and description, choose indexability, and review social text. The application generates the canonical origin, publication dates, author identity, and route from current records. Those facts should not drift because someone copied an old schema block.

Fallbacks are explicit. A missing meta title may use the page title, while a missing canonical uses the normalized route. A malformed override blocks publication instead of producing silent head markup.

Keep the SEO component small

My reusable component contains title, description, focus keyword, supporting keywords, robots choice, social title, social description, and optional image relation. I add validation for lengths and allowed robots values.

I do not treat character counts as ranking rules. The limits protect interface quality and catch accidental paragraphs or truncated phrases.

Generate schema from record facts

A BlogPosting uses the current article title, canonical, author, category, and dates. A Service uses the visible offer and provider. FAQPage appears only when the page renders the matching questions and answers.

I merge a small allowlist of supplemental schema fields rather than letting CMS JSON replace generated identity, dates, or canonical values. That preserves flexibility without trusting stale facts.

Validate canonical and robots together

An indexable record should resolve to one HTTP 200 canonical URL. A draft record remains noindex,follow; a protected preview route may use stricter directives such as noindex,nofollow,noarchive. Both stay out of the sitemap. I reject conflicting states such as an indexable page canonicalized to a draft route.

Tags and location pages need the same rule. The CMS, rendered head, robots response, and sitemap should agree about whether the page belongs in search.

Preview the rendered result

I inspect the page source and rendered DOM for one title, one canonical, one robots directive, social fields, and valid JSON-LD. I compare schema text with the visible page and follow internal links.

Preview access remains protected and noindexed. A polished CMS form does not prove the frontend mapped the fields correctly.

Add publication gates

The publishing checklist catches missing descriptions, duplicate canonicals, unsupported schema types, hidden FAQs, and absent image alt text. Automated checks handle deterministic rules; an editor approves claims and page usefulness.

  • Use safe metadata fallbacks.
  • Generate identity facts in code.
  • Allowlist supplemental schema.
  • Align robots and sitemap state.
  • Test the rendered page.

Need help with Strapi?

Terry Hunt Dev combines Strapi development with technical SEO. Request a CMS metadata and schema review through the contact page.

Related Articles

More articles in Strapi CMS

Enjoyed This Article?

Get more tutorials and insights delivered to your inbox. No spam, just valuable content for web developers.