Blog

What Is a Headless CMS? Simple Explanation and Examples

Updated:

A headless CMS is a CMS without a “head” — that is, without a website of its own. It stores texts, images and prices and delivers them through an API, while the developer decides in their own code how everything looks. Below is a plain-English explanation of how it works, how it differs from a traditional CMS, which kinds of headless systems exist and when you actually need one.

What is a headless CMS, in simple terms

A traditional CMS, such as classic WordPress, has two parts. The “body” is the admin panel and the database where content is stored. The “head” is the theme that turns that content into pages and shows them to visitors. Both parts live together, and the site looks the way the theme allows.

A headless CMS keeps only the body. Content is stored as structured data: a heading, a price, an image, a list of benefits. The website is built by a developer — with React, Next.js, Vue or any other stack — and fetches that data through an API. The same data can feed the website, a mobile app and a screen in a store at the same time.

If you want to understand what a CMS is in general first, start with “What is a CMS”. And if you have met the word “headless” elsewhere — in browsers, servers or online stores — see what headless software means in general.

How it works

  1. The developer defines what the content consists of: for example, the home page has a heading, a price, an image and a list.
  2. An editor fills in those fields in the headless CMS admin.
  3. The website requests the data through the API and receives JSON.
  4. The site’s code puts the data into its own markup and shows it to the visitor.

An API response looks roughly like this:

What a headless CMS returnshttp
GET /api/pages/home?lang=en

{
  "title": "Same-day laptop repair",
  "price": 49,
  "image": "https://cdn.example.com/hero.jpg",
  "features": ["6-month warranty", "Free diagnostics"]
}

And this is how the website uses it:

What the website doesjsx
// Next.js, React, Vue, Astro — doesn't matter: it's a plain request
const res = await fetch('https://cms.example.com/api/pages/home?lang=en');
const page = await res.json();

// from here the developer decides how to display it
<h1>{page.title}</h1>
<p>from {page.price} USD</p>

When the editor changes the price in the CMS, the site gets the new one on the next request. If pages are generated in advance (static site generation), they are rebuilt — on a schedule, with a button or on a signal from the CMS.

REST or GraphQL

Data is delivered in two main ways. With REST, each type of content has its own URL: pages, articles, products. It is simple and works with any language. With GraphQL, there is one endpoint, the request lists the fields you need, and the server returns exactly those. It is convenient for complex relations between data but takes a little more setup. Many systems support both.

Headless vs. traditional CMS

Traditional CMSHeadless CMS
Who controls the lookThe CMS themeThe developer’s code
What it deliversFinished HTML pagesData through an API (JSON)
Website stackWhatever the CMS is written inAny
ChannelsUsually one websiteWebsite, app, other screens
Developer neededNot always: themes and pluginsYes, for the website
What the editor seesOften a page previewOften just form fields
Updates and securityCMS, theme and plugins on one serverAdmin separate from the site

Pros and cons

Pros

  • Any stack. The developer builds the site with what they know and what fits the job, not with the CMS’s language.
  • Speed. Pages can be generated in advance and served as static files — fast and cheap to host.
  • One piece of content, many places. The website, the app and a chatbot use the same data.
  • Security. The admin does not run on the same server as the site, and the site has no plugins that need constant updating.
  • Redesign without losing content. You can change the design or the framework without touching the content.

Cons

  • You can’t do without a developer. There are no ready-made themes: the site has to be built.
  • The editor doesn’t see the page. In many systems they fill in form fields and don’t know how the text will look on the page until they open the site. That is why larger systems add visual editors and previews.
  • More moving parts. The CMS, site hosting, the build, sometimes a separate image service — all of it has to be wired together.
  • What WordPress solves with a plugin, you build yourself: forms, search, comments.

Types of headless CMS

  • Cloud services — Contentful, Storyblok, Sanity, Hygraph. Servers, updates and backups are handled by the vendor; you pay a subscription. Storyblok and Sanity offer visual editing.
  • Open source on your own server — Strapi, Directus, Payload. You install it yourself and own the data, but updates and backups are your job too.
  • Git-based — Decap CMS, TinaCMS. Content is stored as files in the repository next to the code. A good fit for documentation and small sites built with static site generators.
  • Headless WordPress — the familiar WordPress admin, with the site built separately in React or Next.js. Data comes through the built-in REST API or the WPGraphQL plugin.

When you need a headless CMS — and when you don’t

It fits if:

  • the site is built by a developer with React, Next.js, Vue, Nuxt or Astro;
  • the site already runs, and texts are edited by a programmer — and that has to stop;
  • the same content is needed on the website and in an app;
  • load speed matters and you are ready to generate pages in advance.

You don’t need it if:

  • there is no developer — a site builder or WordPress with a ready-made theme is simpler;
  • it is a simple brochure site that hardly ever changes;
  • you need a turnkey online store — that is what e-commerce platforms are for.

The main headless problem: how the editor sees the page

For a developer, headless is convenient: data arrives as clean JSON. For an editor, not always. They see fields named “Heading”, “Subheading”, “Button text” and have no idea whether the new heading fits on one line or how the page will look on a phone. Mistakes get noticed on the live site.

Systems solve this in different ways: a preview in a separate tab, a visual editor inside the CMS that shows the page in a frame, or editing directly on the live site. Before choosing a system, ask an editor — not a developer — to change a couple of texts in the demo and watch how comfortable they are.

A headless CMS with on-page editing: Sitecog

Sitecog is a headless CMS where content is edited right on the site. The developer fetches data with a regular REST request and marks up elements with an attribute once. After that, the editor opens their own site, clicks a heading or an image and changes it in place — and the change is saved to the same data the API returns.

Request and markup for on-page editingjsx
const res = await fetch('https://back.sitecog.com/content/v1/sections/hero?lang=en', {
  headers: { 'x-crm-key': 'pk_…' },
});
const hero = (await res.json()).content;

// the data-crm-text attribute enables editing this heading right on the page
<h1 data-crm-text="hero_title">{hero.hero_title.content.en}</h1>
  • REST and JSON, no SDK: a plain fetch from the browser, the server or at build time;
  • a read-only access key; the cache is cleared right after an edit;
  • up to 20 languages with automatic translation — manual edits are not overwritten;
  • text, HTML, numbers, images, video, links, dates, lists and nested objects;
  • the same script also runs live chat and form submissions.

Where to start

  1. List which content on the site changes: texts, prices, images, articles.
  2. Decide who edits it and how much it matters to them to see the page.
  3. Try two or three systems on one page of the site — with a real editor.
  4. Move the most frequently changed blocks to the CMS first, the rest gradually.

Frequently asked questions

What is a headless CMS in simple terms?

It is a content management system without a website of its own. Texts, images and prices live in it, and a website, an app or any other screen pulls them through an API and displays them however the developer built it.

How is a headless CMS different from WordPress?

Traditional WordPress builds pages itself from a theme and your content and sends the visitor finished HTML. A headless CMS only returns data, and the look of the site is entirely in the developer’s hands. WordPress can also be used headless, through its REST API.

Do I need a developer for a headless CMS?

Yes, at least at the start: the site that fetches content through the API is written by a developer. After launch, an editor changes texts and images without touching code.

Is a headless CMS good for SEO?

By itself it is neither good nor bad. If pages are rendered on the server or at build time (SSR, SSG), search engines see finished HTML. If content is loaded only in the browser, indexing is weaker. Meta tags and URLs are set by the developer.

Can I add a headless CMS to an existing website?

Yes: the developer replaces hard-coded text with data from the API gradually, page by page. There is no need to rewrite the whole site.