Skip to main content

Headless Shopify with Next.js or Hydrogen

Headless Shopify gets sold as the answer to everything slow, and it is not. I have built headless setups in Hydrogen and Next.js and worked with the web since 2010, so I can give you an honest assessment of whether the architecture solves your problem, or whether a theme cleanup does the same for a fraction.

  • I usually reply the same day
  • Written estimate before work starts
Mikkel Tschentscher

star reviews

Read every review
  • The most solution-oriented developer

    In Mikkel's world there are challenges rather than problems.

    Michael Roscoe PedersenEntrepreneur(translated from Danish)
  • Competent, precise and a huge support

    He is simply a pro. Highly competent and precise, brings good input, and is a huge support.

    Carrsten Johan Thessen(translated from Danish)
  • Lightning fast with an eye for detail

    Mikkel is a man after my own heart. Executes at lightning speed, has an eye for detail and is always there when you need him. It does not get better than that.

    Tini Owild(translated from Danish)

Headless Shopify

When headless Shopify makes sense

  • The store is one part of a larger site where the rest runs on something else entirely.
  • You need a storefront that does not look like a webshop: configurators, calculators, heavy product views.
  • Content comes from a CMS that matters more than the product catalogue.
  • Several storefronts must run across markets or brands on top of one catalogue.

When it does not

If the reason is speed alone, start by cleaning up the theme and the apps. I have seen stores go from 2.8 to 1.1 seconds on LCP without touching the architecture.

Headless also moves responsibility from Shopify to you: rendering, caching, deploys and error monitoring. If nobody maintains it after launch, it costs more than you saved.

How I build headless

Hydrogen if the store is the core and you want to stay close to Shopify's own tooling. Next.js if the store is part of something larger, or a Next.js codebase already exists.

In both cases I use the Storefront API and leave checkout with Shopify. There is no reason to build your own checkout, and several good reasons not to.

What is headless Shopify?

Headless Shopify means separating the store's storefront from its engine. Shopify continues as the engine with products, orders, inventory and checkout, while what customers actually see is built as a standalone application fetching data through Shopify's Storefront API.

The word headless comes from removing the head, meaning the theme, from the platform. Instead you build your own storefront in a framework like Hydrogen or Next.js and control every element on the page, without the limits a theme imposes.

It is relevant for stores with needs a theme cannot meet: product configurators, content-heavy universes, several brands on one catalogue, or a store that must be woven into a larger site. For an ordinary Danish webshop with a standard range, a well-built theme is almost always the right answer.

Because headless has become a buzzword, the most important skill is knowing when not to. I have built both since long before the word got popular, and my assessment always starts with the question of what you concretely cannot do today, and whether doing it requires a new architecture.

The technology behind it: Storefront API, Hydrogen and Next.js

A headless Shopify store, or headless commerce as the architecture is also called, has three parts. Shopify is the engine with products, inventory, customers, orders and checkout. The Storefront API is the connection: a GraphQL API where the storefront fetches products, collections and prices and creates the cart the customer is sent to checkout with. And the storefront is the application customers see, built in a framework like Hydrogen or Next.js and hosted on its own.

Hydrogen is Shopify's own React-based framework for headless stores. It comes with ready-made building blocks for cart, product variants and prices, and it can be hosted on Oxygen, Shopify's hosting for Hydrogen. Next.js is a general React framework with no particular tie to Shopify, where you build the connection to the Storefront API yourself, in return for a free choice of hosting and of the rest of the stack.

Most of what a store displays can be fetched through the Storefront API: products, variants, metafields, collections, search and product recommendations. Features that come from apps in the theme today, such as reviews or wishlists, have to be fetched from the app's own API if it has one, or rebuilt. How much needs rebuilding decides a large part of the project's scope.

Headless Shopify and SEO

Headless Shopify can be just as good for SEO as a theme, but it does not happen by itself. With a theme, Shopify and the theme take care of HTML, sitemap, metadata and structured data without anyone thinking about it. In a headless store all of it has to be built, and the first requirement is that pages are rendered on the server, so Google gets the finished content rather than an empty page that JavaScript fills in later in the browser.

Next come the addresses. In a headless store you decide the URL structure yourselves, and it is tempting to tidy up Shopify's fixed /products/ and /collections/. If you do, every old address must redirect to the new one, or you lose the rankings the product and category pages have earned. The redirects have to be handled in the storefront, because that is what answers when Google comes by.

Structured data and metadata must be recreated too. Product schema with price and stock status, which the theme used to put in the code, now has to be built in the storefront, while titles and descriptions can be fetched from the products' SEO fields in Shopify through the Storefront API. If the store has several markets, hreflang and currency must also be handled in the storefront, so each market gets its own version of the page.

Speed is the argument most often used for headless, and it only holds if the storefront is built for it. A React storefront with a lot of JavaScript can give a worse INP than a well-built theme, because the browser has more to do every time the customer clicks. So measure Core Web Vitals on the old store before the project and on the new one afterwards, on the same pages and on mobile.

How a migration to headless works

A migration to headless is not a move of the store. Products, customers, orders and checkout stay in the same Shopify store, and only the storefront gets replaced. That makes it possible to build the new storefront while the old theme-based store keeps selling, and to switch only once the new one has been tested.

The first stage is mapping: which pages and features the current store has, which apps inject something into the theme and need replacing, which URLs get traffic from Google, and how measurement works today. This is where most surprises get found, and it is also where the decision on headless can change, if the list of things to rebuild grows too long.

Then the storefront gets built in stages on a staging address, typically collections and product pages first, then the cart, and finally the content pages and whatever the CMS will control. Each part is compared with the old store, so nothing goes missing along the way. Measurement is set up in the storefront before the switch, because scripts from the theme do not come along.

The switch itself consists of pointing the domain at the new storefront and turning on the redirects. The old store then has to be closed to visitors, so it does not compete with the new one in Google. For the first weeks I keep an eye on error pages, search traffic and conversions, and as long as the theme is still in Shopify, there is a way back if something goes badly wrong.

Headless Shopify for businesses across Denmark

Headless projects are pure development projects, and I run them for clients across the country from Glostrup near Copenhagen. Stores in Aarhus, Odense and Aalborg collaborate with me in exactly the same way as stores on Zealand: video, shared code and continuous deliveries.

A typical project starts with the assessment of whether headless is right. If the numbers say yes, we plan the architecture together with your CMS needs, and the storefront gets built in iterations with a staging address you can follow along the way.

Headless skills are concentrated in a few environments, and many Danish companies outside Copenhagen struggle to find them locally. With remote collaboration that does not matter: you get a specialist with practical Hydrogen and Next.js experience wherever your office is, and without an agency layer between you and the person coding.

What you lose and what you gain

You lose the theme editor. It sounds like a detail and it is not; it is where marketing can today move a section up or down without asking anyone. If that still has to be possible, a CMS is needed, and that is a separate cost in both licence and setup.

You also lose a number of apps. Every app that works by injecting something into the theme stops working. Apps working inside Shopify on orders, inventory and customers keep running without trouble. It is one of the first things I map, because the list often contains at least one app nobody can do without.

In return you get full control of the storefront: no limits from what a theme can do, no scripts you did not ask for, and the ability to build exactly the experience the product requires. For some stores that is decisive. For most it is not.

What you get

Concrete deliverables, not a report of recommendations someone else has to find time for.

  • An assessment before the decision

    An honest review of whether headless is even the answer to your problem. About half the time it is not.

  • A storefront in Hydrogen or Next.js

    Built on the Storefront API with the technology that fits where the store is heading.

  • Checkout with Shopify

    Payment stays where it is secure and maintained, while the storefront is your own.

  • A CMS for the content

    The theme editor goes away with headless, so editing has to be solved from the start, not discovered as a gap afterwards.

View all cases

How it works

Four steps. You know what happens when, and you can stop after any of them.

  1. 01 / 04

    We walk through the job

    A 20-30 minute call where you describe what needs to be built or repaired. I ask about platform, access and deadline, and tell you honestly if the job sits outside what I am good at.

  2. 02 / 04

    Review of your code

    Small jobs get a price after a short clarification. If a larger existing project needs a technical review first, we agree the price and scope of that review before I open the code.

  3. 03 / 04

    Written quote with a clear scope

    You get a firm agreement on what is included, what is not, and when it will be ready. If the scope changes along the way, we deal with it openly instead of letting it drift.

  4. 04 / 04

    Delivery in your own setup

    I work in your own repository and your own hosting and deliver in pieces you can see and approve. When we are done, you have the code, the access and documentation that makes you independent of me.

Brands I've worked with

  • MT Højgaard Danmark
  • Egmont
  • NNIT
  • Visma
  • Lomax
  • Pascal
  • able.
  • OOONO
  • Novo Nordisk Fonden
  • Energii
  • Maersk Tankers
  • Nordkysten Entreprenørfirmaet

Frequently asked questions

What does headless Shopify cost?

It depends on the scope of the storefront, whether a CMS is needed for the content, and how many app features must be rebuilt. After a short clarification of those three things you get a concrete quote, with a same-day reply. In any case, expect a markedly larger project than a theme-based store.

What does headless actually mean?

That the store's front end is built as its own application, while Shopify runs products, orders and checkout behind it. The two parts talk through the Storefront API, and you control everything customers see.

What is the Shopify Storefront API?

It is Shopify's API for building storefronts outside the theme. Through it the storefront fetches products, collections, prices and stock status and creates carts that are passed on to Shopify's checkout. It is a GraphQL API, so the storefront can ask for exactly the data it needs and no more.

Does headless Shopify require Shopify Plus?

No. The Storefront API that headless stores are built on is available on Shopify's standard plans, so headless does not require Plus. Plus can still be relevant for other reasons, for example if checkout needs more customisation than the standard plans allow.

What are the disadvantages of headless Shopify?

That both the project and the running of it get bigger. You get two systems to maintain, Shopify and the storefront, and changes to the storefront usually need a developer. On top of that, the theme editor and the apps that work through the theme go away, and SEO and measurement have to be built in the storefront instead of coming with the theme.

Do we lose Shopify's theme editor?

Yes, it goes away. That is why I usually put a CMS in place if content needs to be editable without a developer. That cost belongs in the calculation from the start.

Do our apps still work?

Some do, many do not. Apps that inject something into the theme stop working, while apps working inside Shopify on orders and inventory keep running. I go through the list as one of the first steps.

Can we go back to a regular theme?

Yes, the product data still lives in Shopify. But going either way is a project, so the decision should rest on solid grounds rather than a hunch.

Hydrogen or Next.js?

Hydrogen if the store is the core and you want to stay close to Shopify's own tooling. Next.js if the store is part of something larger, or there is already a Next.js codebase in-house.

Do you build headless for stores outside Copenhagen?

Yes. These projects run fully remotely, and I have clients in Aarhus, Odense, Aalborg and abroad. Geography has no bearing on either the process or the result.

Define the scope of your task

Send your website URL, what you need solved and your desired deadline. I will assess the next step and describe what the quote includes. Larger investigations are agreed separately before work begins.

Describe your task

Your next step

Get a quote for Headless Shopify

Tell me about your project. I’ll get back to you with questions, options and a concrete next step.