Hi @liaoyi
Understand the goal
You’re not migrating the entire site at once — instead, you’re selectively routing traffic for specific URLs from your old online store (Liquid storefront) to your new Hydrogen app (Oxygen-hosted site).
For example:
https://online.store/collections/* → https://hydrogen.store/collections/*
This approach lets you gradually test Hydrogen performance and functionality while keeping core checkout and account pages on your main store.
Set up redirects from your Online Store to Hydrogen
Shopify’s Liquid storefront doesn’t allow dynamic redirects via Liquid, but you can use one of the following approaches:
Option A: Use Shopify’s “URL Redirects” feature
If your routes are few or static:
- Go to Shopify Admin → Online Store → Navigation → View URL redirects.
- Click Create URL redirect.
- Enter:
- Redirect from:
/collections/shoes
- Redirect to:
https://hydrogen.store/collections/shoes
- Repeat for other static pages.
Pros: Simple, no coding
Cons: Not scalable for wildcard routes like /collections/*
Option B: Use a proxy app or Cloudflare
If you need dynamic/wildcard routing:
Using Cloudflare (recommended)
If your DNS is managed on Cloudflare (or similar CDN), set up redirect rules:
Example Cloudflare rule:
If URL path matches /collections/*
Then Forwarding URL (302 or 301 permanent redirect) to https://hydrogen.store/collections/$1
This handles wildcard paths and keeps SEO-friendly redirects.
Pros: Works for entire URL patterns
Cons: Requires DNS-level access
Option C: Use a custom reverse proxy (advanced)
You can configure a reverse proxy to serve Hydrogen pages under your main domain — e.g.
https://online.store/collections/* proxies requests directly to https://hydrogen.store/collections/*.
This setup requires:
- A CDN or edge worker (Cloudflare Workers, Fastly, Akamai, etc.)
- Proper handling of cookies and Shopify session tokens
Maintain SEO and traffic
To avoid SEO loss:
- Use 301 (permanent) redirects for SEO continuity.
- Add canonical tags on Hydrogen pages pointing to their new URLs.
- Keep sitemap.xml updated (either merged or Hydrogen-only).
- Maintain identical meta titles, meta descriptions, and OpenGraph tags on Hydrogen pages.
- Make sure to set up Google Search Console for both domains and monitor crawl/index coverage.
4. Analyze the migration impact
Track performance and ranking differences:
- Google Search Console:
- Add both domains (
online.store and hydrogen.store)
- Monitor impressions, clicks, and average position.
- Google Analytics or Shopify Analytics:
- Compare bounce rate, conversion rate, and average session duration before/after redirect.
- Hydrogen monitoring tools:
- Use Shopify Oxygen logs + Vercel/Cloudflare analytics to monitor route load times and traffic.
- A/B testing (optional):
- Temporarily route a % of traffic to Hydrogen pages to measure performance before full migration.
Gradually expand routes
Once you’re satisfied with the initial routes, expand the redirect coverage:
/products/*
/blogs/*
/policies/*
Keep /cart, /checkout, and /account on the Online Store until Hydrogen supports full checkout flow via Storefront API.
Best regards,
Devcoder 