Skip to content
BLOG AI home

SEO for a headless CMS blog (Strapi): what WordPress plugins do that you have to build yourself

10 min read
SEO for a headless CMS blog (Strapi): what WordPress plugins do that you have to build yourself

Strapi SEO comes down to one fact: Strapi stores your posts and serves them as data, but it never builds the page Google reads. On WordPress, core and a plugin like Yoast handle the title tag, meta description, canonical, XML sitemap, structured data and redirects for you. On a Strapi blog, every one of those is a job for your front end, and if nobody builds it, it simply isn't there.

This guide lists what WordPress gives you by default, what you have to build yourself on Strapi, and a checklist to run before your headless blog goes live.

Key takeaways

  • Strapi serves posts as data, so titles, meta descriptions, canonicals, sitemaps and structured data must all be built in your front end.
  • WordPress core adds an XML sitemap and redirects old slugs; on Strapi neither exists until you build it.
  • Strapi's official SEO plugin manages SEO fields in the admin panel but doesn't output any tags on your site.
  • Render meta tags and robots directives on the server, and return a real 404 for unknown slugs.
  • Build the sitemap from published entries only, with honest lastmod dates, and test one live post with view source before launch.

Why SEO for a Strapi blog is mostly a front-end job

Strapi is a headless CMS. Your posts live in a collection, and your website (often Next.js, Nuxt, Astro or similar) fetches them through Strapi's REST API and turns them into pages. Strapi returns JSON. It has no theme, no <head> and no sitemap of its own.

So "Strapi SEO" really has two halves:

  1. In Strapi: a place to store the SEO data, such as the meta title, meta description, canonical URL, image alt text and published date.
  2. In your front end: code that turns that data into tags, files and responses that search engines read.

Most problems on headless blogs come from doing the first half and assuming the second happens by itself.

Rendering matters too. Google can run JavaScript: its JavaScript SEO basics explain that Googlebot queues pages for rendering in a headless Chromium. The same page says server-side rendering or pre-rendering is still a great idea, because it's faster for users and crawlers and not all bots can run JavaScript. For a blog, render the post's text and its meta tags on the server, or build them as static pages.

What WordPress plugins do that you have to build yourself

Here's the gap at a glance. The left column is what a typical WordPress blog gets from core or an SEO plugin. The right column is what a Strapi blog needs instead.

SEO job

On WordPress

On a Strapi blog

Title tag and meta description

SEO plugin fields, output in the theme's <head>

Store in Strapi, render in your front end's page metadata

Canonical URL

Added by the SEO plugin

Store or compute it, render <link rel="canonical"> yourself

XML sitemap

Built into core since 5.5, at /wp-sitemap.xml; SEO plugins add their own

Generate it from Strapi's published entries

Article structured data

Added by plugins such as Yoast

Build the JSON-LD from the post's fields

Redirect when a slug changes

Core redirects old slugs to the new address

No redirect unless you build one

Image alt text

Field in the media library, output by the theme

Strapi's media library stores alternative text, but your front end must output it

Keeping the sitemap current

The core sitemap is generated from your live posts

Your sitemap code must re-read Strapi; IndexNow is optional

The WordPress side is documented. WordPress 5.5 added XML sitemaps to core, exposed at /wp-sitemap.xml. Core's wp_old_slug_redirect() redirects old slugs to the correct permalink. Yoast says its plugin generates XML sitemaps and structured data automatically. None of that exists on a Strapi blog until your front end does it.

If you're also publishing to a WordPress site, our guide to publishing AI content to WordPress without breaking formatting covers that side.

Step 1: give every post SEO fields in Strapi

Start with the content model. Add these to your posts collection, either directly or in a reusable SEO component:

  • Meta title (text). Keep it short. Google's guidance on title links asks for descriptive, concise <title> text and explains that Google draws on several sources from the page when it sets the title shown in results.
  • Meta description (long text). Google's snippet guidance says it sometimes uses the meta description when it describes the page better than the on-page text, so write one for every post. Once a post has search data, Search Console's click-through rate shows which titles and descriptions to rewrite.
  • Canonical URL (text, optional). Leave it empty on most posts and let the front end default to the post's own address. Fill it only when a post deliberately points elsewhere.
  • Slug (UID field). It sets the address, so treat it as permanent once the post is live.
  • Featured image with alt text.
  • Author (relation to an authors collection) and published / updated dates.

Strapi has an official SEO plugin, strapi-plugin-seo. It creates a shared seo component with a meta-social sub-component and adds a side panel in the Content Manager with a search-result preview and an SEO analysis. It's useful for editors. But it manages fields in the admin panel. It doesn't put a single tag on your website. That's still Step 2.

Step 2: render titles, descriptions and canonicals on the server

Every post page needs, in the HTML that arrives from the server:

  • a <title> from the meta title, falling back to the post title
  • a <meta name="description"> from the meta description
  • a <link rel="canonical"> pointing at the post's own public address (or the stored canonical)
  • Open Graph tags for sharing, if you want them

In Next.js, the generateMetadata function does this per page, including the canonical through its alternates option. Other frameworks have equivalents.

Two traps catch headless sites often:

A noindex you meant to remove. If a template ships noindex in the HTML and JavaScript removes it later, Google may never see the change. Its JavaScript guidance warns that when Google finds noindex it may skip rendering, so changing the robots tag with JavaScript may not work as expected. Set robots tags on the server.

Soft 404s. A client-rendered "post not found" page that returns HTTP 200 looks like a real, empty page. Google's JavaScript guidance lists ways to avoid soft 404s with client-side routing. On a server-rendered blog, return a real 404 status when Strapi has no published entry for the slug.

Step 3: build a sitemap from Strapi's published posts

Your sitemap should list every live post and nothing else. Build it from Strapi:

  1. Query the posts collection for published entries only. In Strapi 5, the REST API's status parameter selects published or draft. Make sure drafts can't reach the sitemap.
  2. Turn each slug into its public URL using the same pattern as your routes.
  3. Set lastmod from the post's real last update.

Next.js can generate this from a sitemap.ts file. Google's sitemap documentation sets the limits (50,000 URLs or 50MB uncompressed per file) and says Google uses lastmod if it's consistently and verifiably accurate. Don't stamp every URL with today's date on each build. That teaches Google to ignore the field.

Submit the sitemap in Search Console and add a Sitemap: line to your robots.txt. Search Console will then tell you which posts it has indexed. Our guide to measuring blog performance in Search Console explains what to watch after that.

Tell search engines when a post changes

IndexNow lets a site notify search engines straight away when a URL is added, updated or deleted. Its FAQ lists endpoints for Bing, Naver, Seznam.cz and Yandex, and a submission to one is shared with all IndexNow engines. Google isn't on that list, so keep your sitemap accurate for Google. A Strapi webhook on publish that calls your own IndexNow handler is a common way to wire this up.

Step 4: add structured data, redirects and image alt text

Article structured data

Google's Article structured data page says there are no required properties. It recommends adding those that apply, such as headline, image, author, datePublished and dateModified, and it accepts BlogPosting for blog posts. Build the JSON-LD on the server from the same Strapi fields you already render. Then validate one post with the Rich Results Test. Don't add FAQPage markup to chase a rich result, because Google no longer shows FAQ rich results.

Keep dateModified honest. Google's guidance on publication dates talks about when a page was published or significantly updated. Change it when the post really changes, not on every deploy.

Redirects when a slug changes

WordPress quietly redirects old slugs. Strapi doesn't. If an editor changes a live post's slug, the old address 404s and any links to it break. Two fixes:

  • Lock slugs after publishing, by convention or with a field rule.
  • Keep a redirects collection in Strapi (old path, new path) that your front end or host reads and serves as 301s. Google's redirect documentation explains why a permanent server-side redirect is the right choice for a moved page.

Images and alt text

Upload images through Strapi's media library and fill in the alternative text there. Then make sure your image component outputs it. Google's image SEO guidance shows descriptive alt text and uses it to understand the image. Missing alt text on headless sites is very often a front-end component that ignores the field.

Where Blog AI fits on a Strapi blog

Blog AI publishes into your own Strapi collection, so it handles the Strapi half of the work. According to Blog AI's Strapi integration page, it fills the SEO title, meta description, canonical URL, featured image (uploaded as WebP with its alt text), categories, tags and author into whichever of your fields you map, including fields inside an SEO component such as seo.metaTitle. You can also map a long text field to structured data (JSON-LD). It sets the slug on first publish and never changes it afterwards, so you avoid the slug-change problem from Blog AI's side.

What it doesn't do matters just as much here. Blog AI doesn't change your content types, plugins or front end, and it doesn't rebuild or redeploy your site. Your templates still need to render the fields, your sitemap still needs to read them, and a statically built site may need a rebuild or revalidation hook to show new posts. Strapi's API has no "publish later", so scheduled posts wait in Blog AI and are created in Strapi within a few minutes of the time you pick. If you're still deciding on that schedule, our guide to how often a small business should blog suggests a realistic pace for one person. The Strapi connection guide lists the token permissions and field mapping step by step.

If you're comparing tools for a headless blog, our buyer's checklist for AI blog generators includes the CMS questions worth asking.

The Strapi SEO checklist before you launch

Run this on one live post before you publish the rest. Use "view source" (not the browser inspector) so you see what the server sends.

  • The post text is in the HTML source, not loaded after the page renders.
  • <title> and <meta name="description"> come from the Strapi fields, with sensible fallbacks.
  • <link rel="canonical"> points at the post's own public URL, with the right host (www or not) and protocol.
  • No stray noindex in the HTML or the X-Robots-Tag header.
  • An unknown slug returns HTTP 404, not a 200 "not found" page.
  • /sitemap.xml lists only published posts, with real lastmod dates, and is submitted in Search Console.
  • robots.txt points to the sitemap and doesn't block your post URLs or the CSS and JavaScript they need.
  • JSON-LD for BlogPosting passes the Rich Results Test.
  • Every image has alt text in the rendered HTML.
  • Changing a test post's slug creates a 301 from the old address, or slugs are locked once live.
  • Your Strapi admin and API host aren't serving pages that could be indexed in place of your blog.

Then check the post with Search Console's URL Inspection tool and look at the rendered HTML Google sees. The core insight is that Strapi gives you full control over SEO, but no defaults. Write this checklist into your front end once, test it on one post, and every post you publish after that inherits it.

Frequently asked questions

Does Strapi have an SEO plugin?

Yes. Strapi's official SEO plugin adds a shared SEO component with meta title, meta description and social fields, plus a search-result preview and an SEO analysis in the Content Manager. It helps editors fill the fields consistently. It doesn't render anything on your website, though: your front end still has to turn those fields into title tags, meta descriptions, canonicals and structured data.

How do I create a sitemap for a Strapi blog?

Generate it in your front end. Query Strapi for published posts only, turn each slug into its public URL with the same pattern as your routes, and set lastmod from each post's real last update. Next.js can do this with a sitemap.ts file. Google limits each sitemap file to 50,000 URLs or 50MB uncompressed. Then submit it in Search Console and list it in robots.txt.

Is a headless CMS good for SEO?

It can be as good as WordPress or better, because you control every tag and can render fast server-side pages. The catch is that nothing is done by default. A headless blog only gets titles, canonicals, a sitemap, structured data and redirects if your developers build them. Teams that skip that work often launch with missing meta tags, no sitemap or broken redirects.

Can Google index a JavaScript-rendered Strapi site?

Usually, yes. Google's documentation says Googlebot queues pages for rendering and runs JavaScript in a headless Chromium browser. It also says server-side rendering or pre-rendering is still a great idea, because it's faster and not all bots run JavaScript. For a blog, render the post text and meta tags on the server, and never rely on JavaScript to remove a noindex tag.

Drafted with AI assistance, edited, and source-checked by hand. Published and measured with Blog AI.

All publishing posts

Stop guessing what to write next

Blog AI turns your Search Console data into a ranked list of posts to write and fix.

Start free