Case study
SEO on a headless CMS: a Strapi + Astro build
A working example of SEO on a headless CMS. Content lives in Strapi 5, Astro turns it into static pages at build time, and Vercel hosts the result.
This is a demo I built and run, not client work.
- SEO and the build Together, no handoffs
- You own it all Domain, code and data
- Straight talk No fake reviews
The numbers
100 / 100 / 100
Lighthouse mobile on the home page: performance, accessibility and best practices
Lighthouse mobile, 11 Nov 2026
| Measure | Figure | Source | Date |
|---|---|---|---|
| Home page: performance, accessibility, best practices | 100, 100, 100 (in all 3 runs) | Lighthouse mobile, run on the live demo | 11 Nov 2026 |
| A guide page: performance | 98 to 100 (3 runs) | Lighthouse mobile, run on the live demo | 11 Nov 2026 |
| A guide page: accessibility, best practices | 100, 100 (in all 3 runs) | Lighthouse mobile, run on the live demo | 11 Nov 2026 |
| Guides I wrote for the demo | 8 | The demo site | Nov 2026 |
| Meta title length | 10 to 60 characters, required to publish | Strapi schema file | Nov 2026 |
| Meta description length | 50 to 155 characters, required to publish | Strapi schema file | Nov 2026 |
| Strapi API requests per build | 3 | Build log | Nov 2026 |
Lighthouse 13.6.0 with its default mobile settings, 3 runs per page. The guide page is the crawl budget guide. I don't quote the SEO score: the demo is noindexed on purpose, and that lowers the score by design.
The goal
I built this demo in November 2026 to show how I set up SEO on a headless CMS. You can open it at solveara-strapi-demo.vercel.app.
The site holds 8 technical SEO guides I wrote. They are my writing samples:
- Crawl budget: when it matters and when it doesn't
- Canonical tags: 6 common mistakes and how to fix them
- Core Web Vitals: fixing LCP on an image-heavy page
- Internal linking for a 50-page service site
- Schema markup that's worth adding (and what isn't)
- Redirect chains after a site migration
- Writing for AI Overviews and answer engines (GEO/AEO)
- llms.txt: what it is and what it does today
Content model and SEO fields
I built the content model in code, as schema files kept in git, so every change to it is versioned. There are four content types: article, category, author and site settings.
Every article uses a shared SEO component. Required fields and length limits sit in the schema, so an editor can't publish an article without a valid meta title and description.
The shared SEO component
| Field | Rule |
|---|---|
| Meta title | Required, 10 to 60 characters |
| Meta description | Required, 50 to 155 characters |
| Canonical URL | Optional, must start with https:// |
| OG image | Optional, images only |
| noIndex | On or off, off by default |
| Keywords | Optional, up to 160 characters |
Bulk content with MCP and Claude Code
Strapi 5 has a built-in MCP server. I connected it to Claude Code with an admin token limited to the article, category, author and site-settings types.
Through it, I created the categories, the author entry and 8 article drafts, and later edited them in bulk. The MCP tools follow the same validation as the content model, so a draft with a 70-character meta title is refused.
Drafts stay drafts until a person publishes them. I reviewed and fact-checked every guide before publishing it.
From Strapi to the page
Astro fetches from Strapi at build time only, with a read-only token. Visitors' browsers never call the API, and a full build makes 3 requests.
Every page has one H1, a title, a meta description, a canonical, Open Graph and Twitter tags, and breadcrumbs.
Each page has one JSON-LD @graph: WebSite, WebPage, BreadcrumbList and Article, with the author as a Person and both dates. Guides with FAQs also get FAQPage. I keep FAQPage to describe the page, not for rich results: Google stopped showing FAQ rich results for all sites on May 7, 2026.
The sitemap is built from Strapi data, and each guide's lastmod comes from its dateModified. Images go through astro:assets with width, height and alt text, and the pages load no framework JavaScript.
Publishing and rebuilds
Publishing, updating or unpublishing an article in Strapi fires a webhook. A small rebuild listener skips plain draft saves, waits 20 seconds so a burst of edits becomes one build, then builds the Astro site and deploys it to Vercel.
With Strapi hosted on a server, the webhook would call a Vercel deploy hook instead.
Why the demo is noindexed, and how
It's a demo, so it shouldn't appear in Google. Every page says noindex twice: in a robots meta tag and in an X-Robots-Tag header.
robots.txt still allows crawling. Google has to crawl a page to see its noindex. If robots.txt blocked the page, Google couldn't read the tag and could still index the bare URL from links elsewhere.
What I'd do on your Strapi site
- Put the SEO fields in one shared component, with required fields and length limits, so a page can't be published without them.
- Build titles, canonicals, Open Graph tags and JSON-LD from those fields in the front end, not by hand on each page.
- Build the sitemap from the CMS, with lastmod from the date the content changed.
- Rebuild and deploy on publish, so edits go live without waiting for a developer.
- Use the MCP server for bulk edits, with every change reviewed before it goes live.
How to read this
This is a demo I built, not client work. It's noindexed, so it has no search traffic or rankings, and I don't claim any.
The Lighthouse scores are lab tests from one computer on one day. Real visitors' speed depends on their phone and network.
Strapi runs on my own computer for this demo, so the site only rebuilds while it is running. On a real project, Strapi would be hosted.
Questions
Can editors break SEO in Strapi?
Not easily, if the content model is set up for it. In this demo, the meta title and description are required and length-limited in the schema, so an article can't be published without them. A publish check also blocks an H1 inside the article body, leftover placeholder text, and a modified date earlier than the published date.
How do bulk SEO changes work?
Through Strapi's built-in MCP server, connected to Claude Code with a token limited to the content types that need changing. The changes are made as drafts, reviewed, then published. The same validation applies, so a bulk edit can't save a meta title that's too long.
Do I need to leave WordPress for this?
No. If WordPress works for your team, I'd usually fix what you have first, which is what my WordPress SEO work covers. A headless CMS is an option when you want a faster front end and stricter SEO fields than your current setup gives you.
Want this kind of work on your site?
Send me your website and tell me where your customers are. I'll tell you honestly what I'd do first.
I usually reply within 24 hours, Monday to Saturday.