How to Attach a Domain to the Shopify Hydrogen Channel and Make It Primary

attach-domain-to-shopify-hydrogen-channel-primary-domain

Last updated: May 21, 2026

How Do You Make a Custom Domain Primary for a Shopify Hydrogen Store?

Attaching a domain to Shopify Hydrogen is not only a DNS task. It is a launch task that connects three things: the custom domain customers type into the browser, the Hydrogen production environment that serves the storefront, and Shopify's hosted checkout that still completes the order.

In Shopify's domain model, a domain can target the Online Store or a custom storefront environment. Shopify's Help Center explains that each target needs one primary domain, and the Hydrogen target is the one you use when the storefront is hosted through Shopify's Hydrogen and Oxygen workflow. That distinction matters because a headless storefront can be live on Oxygen while the domain is still pointed at the old Online Store target.

This guide covers the practical merchant and developer workflow: prepare the Hydrogen storefront, connect the domain to Shopify, make the production environment public, assign the domain to the Hydrogen channel, set it as primary, preserve checkout on a branded subdomain, and run the SEO checks that protect rankings after launch.

What Should Be Ready Before You Change the Primary Domain?

Treat the domain switch as the final step of a production release, not as the first step of setup. Before you point real shoppers at Hydrogen, confirm that the storefront is ready to receive commercial traffic.

  • Hydrogen channel installed: Shopify's Hydrogen sales channel is required for Hydrogen storefront management, Oxygen hosting, environment variables, and deployment logs.
  • Production deployment exists: the storefront should be deployed to the production environment, not only running locally or on a preview URL.
  • Production URL privacy is public: in the Hydrogen channel, the production environment needs to be publicly reachable before it becomes the store's main destination.
  • Domain is connected in Shopify: the root domain, www version, or chosen storefront subdomain needs to be added under Settings > Domains and verified.
  • Checkout subdomain is planned: use a branded checkout subdomain such as checkout.example.com so the checkout transition feels intentional.
  • SEO launch list is complete: redirects, canonical URLs, sitemap, robots.txt, structured data, and analytics should be ready before the switch.

Which DNS Records Does Shopify Expect?

If your domain is managed by Shopify, DNS is usually handled inside Shopify admin. If the domain is managed by a third-party registrar such as GoDaddy, Namecheap, Cloudflare, IONOS, Squarespace, or another provider, update DNS at that provider and then verify the domain in Shopify.

Use case Record Value Notes
Root domain, such as example.com A 23.227.38.65 Shopify documents this as the default IPv4 address. Shopify may show another valid regional host ID after connection.
Root domain IPv6 AAAA 2620:0127:f00f:5:: Some DNS providers require the expanded IPv6 format.
www.example.com CNAME shops.myshopify.com Use this for the www subdomain when connecting a full domain to Shopify.
checkout.example.com or another checkout subdomain CNAME shops.myshopify.com A subdomain does not need an A record. It can be connected and later targeted to Online Store for checkout.

DNS can update quickly, but Shopify notes that domains can take up to 48 hours to be fully live. If Shopify asks for extra verification, add the TXT record shown in the domain details screen and check again after the provider publishes it.

How Do You Attach the Domain to the Hydrogen Channel?

  1. Deploy or connect the Hydrogen storefront. In the Hydrogen channel, select the storefront connected to your GitHub repository or deploy with the Hydrogen CLI. Shopify's Hydrogen storefronts interface manages storefronts, environments, variables, and deployments.
  2. Confirm the production environment is the one you want live. Review the production deployment, environment variables, Storefront API token, customer account settings, and app integrations before traffic is moved.
  3. Make the production environment public. In Shopify admin, go to Sales channels > Hydrogen, open the target storefront, click the menu beside the production environment, choose Edit environment, set URL privacy to Public, and save.
  4. Add or verify the main domain. Go to Settings > Domains, connect the existing domain or subdomain, and follow Shopify's verification prompts until the domain is connected.
  5. Point checkout to a branded subdomain. Add a subdomain such as checkout.example.com, set its target to Online Store, and set its domain type to Primary for that target. This keeps Shopify-hosted checkout branded and predictable.
  6. Point the main domain to Hydrogen. In Settings > Domains, choose the domain that should receive storefront traffic, change its target to the production Hydrogen storefront, and set the domain type to Primary.
  7. Update redirect domains. If www, the apex domain, campaign domains, or old variants should collapse into the new primary domain, set them as redirect domains targeting Hydrogen instead of leaving them as aliases by accident.
  8. Remove Online Store password protection if enabled. Shopify's migration guidance warns that Online Store password protection can prevent Hydrogen checkout behavior. Disable it before launch if it is still active.

Should the Apex Domain or WWW Be Primary?

Choose one customer-facing URL and make every other version redirect to it. Either example.com or www.example.com can work as the primary storefront domain. The right choice is usually the one your brand has historically used, the one that already has the most search equity, or the one your marketing and analytics systems expect.

The risky pattern is letting both versions behave as separate aliases. That can split links, confuse canonical tags, and make analytics reports harder to interpret. For SEO and GEO, consistency matters. AI answer engines, search crawlers, product feeds, and analytics tools should all see the same canonical storefront domain.

How Does Checkout Work After Hydrogen Becomes Primary?

Hydrogen controls the custom storefront, but Shopify still hosts checkout. When the shopper clicks checkout from a Hydrogen cart, they are sent to Shopify's checkout system. For a polished launch, the checkout URL should feel connected to the storefront instead of falling back to a raw myshopify.com address.

Shopify's migration documentation recommends assigning a checkout subdomain, for example checkout.example.com, to checkout. The practical setup is: connect the checkout subdomain in Shopify, target it to Online Store, and make it primary for that target. If you are migrating from Liquid to Hydrogen and relying on shared carts, also confirm that the same products are published to both the Online Store channel and the Hydrogen storefront.

What SEO and GEO Checks Should You Run After the Domain Switch?

A domain switch can look successful in the browser while still creating crawl, indexing, analytics, and AI-discovery issues. Run these checks before and after the primary-domain change.

  • Canonical URLs: every indexable route should canonicalize to the final Hydrogen primary domain, not the preview URL, old Online Store domain, or myshopify.com.
  • Redirects: legacy product, collection, page, cart, and campaign URLs should redirect cleanly to their Hydrogen equivalents.
  • robots.txt: Shopify's Hydrogen SEO docs note that on Oxygen, robots.txt is served only in the public production environment and only when a custom domain is set.
  • sitemap.xml: submit or recheck the sitemap after launch and make sure it lists the canonical Hydrogen URLs.
  • Structured data: Product, Breadcrumb, Organization, Website, FAQ, and Article schema should use the new primary domain where URLs appear.
  • Product feeds: update Google, Meta, and other feed rules so ad platforms and merchant feeds use the Hydrogen storefront domain.
  • Analytics: verify cross-domain tracking between storefront and checkout so GA4, ad pixels, and attribution tools do not split sessions.
  • AI search context: keep brand name, domain, policies, product names, collections, and support pages consistent so generative answer engines can identify the store entity clearly.

For a deeper launch process, pair this article with the Oxygen SEO deployment checklist and the Hydrogen redirects and URL migration guide.

Why Is the Domain Target Option Missing or Blocked?

If Shopify does not let you update the target or set the domain as primary, work through the setup state first. The most common causes are incomplete DNS, pending TXT verification, a domain still connected to another Shopify store, a Hydrogen environment that is not public, or a storefront that has not been deployed to production.

Also check whether you are editing the right domain. The root domain, www subdomain, checkout subdomain, and any regional subdomains can each have different targets and types. Shopify allows primary, alias, and redirect behavior per target, so a domain can appear connected while still pointing at the wrong destination.

What Should You Test Before Telling Customers the Store Is Live?

  1. Open the primary domain in a clean browser and confirm it serves the Hydrogen storefront.
  2. Open the non-primary version, such as www or apex, and confirm it redirects as expected.
  3. Check that TLS is valid and no browser security warning appears.
  4. Visit homepage, collection pages, product pages, search, cart, policy pages, account links, and 404 routes.
  5. Add a product to cart and continue to checkout on the branded checkout subdomain.
  6. Test high-value legacy URLs from Google Search Console, analytics, ads, email, and backlinks.
  7. Inspect canonical, Open Graph, Twitter card, hreflang, and structured data on important templates.
  8. Request /robots.txt and /sitemap.xml from the final primary domain.
  9. Confirm analytics, consent mode, ad pixels, and server-side events still fire correctly.
  10. Monitor crawl errors, redirect errors, checkout completion, and organic landing pages for the first few days after launch.

Official Shopify References

The workflow above is based on Shopify's current documentation for Hydrogen and Oxygen fundamentals, redirecting traffic to the Hydrogen channel, domain type and target settings, manual third-party domain connection, and Hydrogen SEO behavior on Oxygen.

Frequently Asked Questions

How do I attach a domain to the Shopify Hydrogen channel?

Connect the domain in Shopify admin under Settings > Domains, make the Hydrogen production environment public, then change the domain target to the production Hydrogen storefront and set the domain type to Primary.

Should checkout use the same domain as my Hydrogen storefront?

Shopify checkout remains Shopify-hosted. For a branded Hydrogen launch, use a checkout subdomain such as checkout.example.com, target it to Online Store, and set that target as Primary for checkout traffic.

Why can I not set my Hydrogen domain as primary?

The domain usually needs to be connected, DNS-verified, and pointing to Shopify before its target and type can be changed. The Hydrogen production environment also needs to be ready and public.

Do I need both an apex domain and www for Hydrogen?

You should choose one canonical primary domain, such as example.com or www.example.com, and redirect the other version to it. Avoid leaving both as separate alias experiences unless that is intentional.

What should I test after making Hydrogen the primary domain?

Test TLS, homepage, collections, products, cart, checkout, redirects, canonical tags, sitemap, robots.txt, analytics, product feeds, and high-value legacy URLs before considering the launch complete.

Bottom Line

The correct Hydrogen domain setup is: production Hydrogen storefront public, main customer domain targeted to the Hydrogen production environment and set as Primary, checkout subdomain targeted to Online Store and set as Primary for checkout, and every alternate domain set as a redirect unless there is a clear reason to keep it as an alias.

That setup gives customers a coherent domain experience, gives search engines one canonical storefront URL, and gives AI answer engines a cleaner entity signal for the brand. The technical DNS work is only the beginning. The launch is complete when checkout, redirects, indexing, analytics, and feeds all agree on the same primary Hydrogen domain.

or