Hydrogen SEO Survival Guide
Introduction
Migrating from a Shopify Liquid theme to a Hydrogen storefront brings speed and flexibility — but it also introduces SEO risks.
Client-side rendering, broken canonicals, and misconfigured routers can cause rankings to plummet. This guide shows how to survive (and thrive) in SEO while building Hydrogen.
Common SEO Pitfalls in Hydrogen
- ❌ Client-only data fetches
- Content renders after JS execution.
- Search engines may crawl partial pages.
- ❌ Broken canonical tags
- Dynamic routing misconfigures <link rel="canonical">.
- Duplicate PDP/PLP URLs confuse Google.
- ❌ JavaScript-only routers
- Using client navigation without fallbacks.
- Crawlers can’t follow deep links.
- ❌ Over-streaming SSR
- Deferring too much → crawlers see empty shells.
Best Practices
Use Global <Seo> Component
import {Seo} from '@shopify/hydrogen'; export default function Product({product}) { return ( <> <Seo type="product" data={product} /> <h1>{product.title}</h1> </> ); }
- Automates titles, meta, structured data.
- Ensures consistency across PDPs/PLPs.
Canonicals + Hreflang
- Explicitly declare canonical URLs for PDP/PLP.
- Add hreflang for multi-region stores.
Schema.org Markup
- Include JSON-LD for product + review data.
- Ensure SSR, not injected via JS.
Profiling GraphQL Bloat
- Fetch only fields needed for SEO-critical content.
- Faster SSR = faster indexation.
Tools for SEO QA
- Screaming Frog → crawl Hydrogen build for canonicals, hreflang, metadata.
- Lighthouse CI → enforce SEO scores in CI/CD.
- Google Search Console → check coverage for streaming/defer issues.
Case Example: Electronics Retailer
- Migration tanked PDP traffic (-40%) due to missing canonicals + JS-only reviews.
- Fixes:
- <Seo> component for consistency.
- Server-rendered schema.org markup.
- Preloaded critical PDP copy.
- Outcome: traffic restored, rankings improved +12% above pre-migration.
Guardrails
- ✅ Always SSR SEO-critical content (title, description, schema).
- ✅ Use <Seo> component globally.
- ✅ Add canonical + hreflang explicitly.
- ✅ Profile GraphQL queries for speed.
Conclusion
Hydrogen can be SEO-friendly — if you do it right. By SSR’ing critical content, fixing canonicals, and using structured data, you can migrate without losing rankings.
Don’t let SEO be the hidden cost of headless.