Hydrogen versus Astro for headless Shopify

Two ways to build a custom storefront on Shopify, what each optimises for, and why we choose Astro by default.

3 minread 699words last updated

The short answer

There are two mainstream ways to build a custom storefront on Shopify. Hydrogen is Shopify’s own framework: server-rendered, hosted on Shopify’s infrastructure, with commerce components and tight integration built in, designed for fully dynamic and personalised storefronts. Astro is a general framework that builds pages as static files with small interactive islands, hosted anywhere, with Shopify as a data source through the storefront API. Where pages are the same for every visitor and content and speed matter, Astro’s static pages are faster, cheaper to host and easier to combine with articles and guides. Hydrogen fits when per-visitor personalisation, complex real-time logic and Shopify’s hosting are the priorities. We choose Astro by default and say why below.

Side by side

HydrogenAstro
RenderingServer-rendered per requestStatic pages built ahead, with islands for interaction
HostingDesigned for Shopify’s hostingAny static host with an edge network, in your accounts
Commerce componentsBuilt inBuilt or composed from the storefront API
Speed profileDepends on server rendering and cachingStatic files at the edge; minimal JavaScript
ContentPossible; not the focusContent collections alongside products; a strength
PersonalisationNatural on the serverPossible in islands and edge functions; not the default
Ownership and costOne vendor; their pricingYour hosting accounts; usually very low cost
Best forDynamic, personalised storefronts tightly bound to ShopifyFast, content-rich, design-controlled storefronts

How we decide

  1. Are the pages the same for every visitor? For a normal store, yes, except the cart and account. Static wins.
  2. Does content matter? Articles, guides, hubs alongside products favour Astro’s content collections.
  3. Is heavy personalisation core? Per-visitor pricing, recommendations rendered on the server, real-time logic across the page favour Hydrogen.
  4. Where should hosting live? Your accounts at low cost favour Astro; one vendor favours Hydrogen.
  5. What does the team know? Both are mainstream; Astro’s model is simpler to reason about for a content-heavy site.

Why we choose Astro by default

Because a store is a brand and content business whose product pages are identical for everyone, whose customers are on phones, and whose growth depends on being found for the questions people ask before buying. Static pages at the edge with islands are the fastest way to serve that, content collections make articles and products one site, and hosting in the client’s own accounts keeps ownership and cost where we think they belong. Where a store genuinely needs Hydrogen’s strengths, we say so.

What this means for you

Choose Hydrogen if your storefront’s core is per-visitor personalisation and you want everything hosted with Shopify. Choose Astro if your store’s pages are the same for everyone, content matters, speed on phones decides conversion and you want the storefront in your own accounts. Both are serious tools; the store’s shape, not the framework’s badge, should decide.

Written by the CivSec S.M.A.R.T team

We build and run websites, software and AI systems for businesses. We write about what we see in that work, in plain language, and we update articles when things change.

Last checked . Spotted something outdated? Tell us.

Frequently asked questions

Is Hydrogen not the safer choice because it is Shopify's own?

It is well supported and a good fit for its intended case: dynamic, personalised storefronts hosted on Shopify's infrastructure. Being Shopify's own does not make it better for a store whose pages are identical for every visitor and whose content and speed matter most; there, static pages with islands are faster and simpler. Choose on what the store needs, not on whose logo the framework carries.

Can an Astro storefront do everything a Hydrogen one can?

Nearly everything a typical store needs: products, collections, search, cart, checkout hand-off, markets, content, customer accounts through Shopify's account features. What Hydrogen does more naturally is heavy per-visitor personalisation rendered on the server and deep use of Shopify's hosting integrations. If a store's core experience depends on those, Hydrogen is the better tool.

What about hosting?

Hydrogen is designed for Shopify's hosting, which keeps everything in one place at their pricing. Astro deploys to any static host with an edge network, in your own accounts, usually at very low cost for a store's traffic pattern. Ownership and cost favour Astro; convenience of one vendor favours Hydrogen.

Sources

  1. Shopify developer documentation: Hydrogen (accessed 2026-09-12)
  2. Astro documentation (accessed 2026-09-12)