Using my custom domain for the checkout page when using Buy Button

Topic summary

Issue: Checkout from embedded Shopify Buy Button sends users to shopname.myshopify.com instead of a custom domain, raising branding/credibility and analytics concerns. Some also want a “continue shopping” link and clarity on Facebook Pixel events.

Workaround reported to work: Edit the Buy Button embed (Shopify Buy Button JS SDK) and set ShopifyBuy.buildClient({ domain: “checkout.yourdomain.com”, storefrontAccessToken: “…” }). Point a subdomain (e.g., checkout.yourdomain.com) via CNAME to shops.myshopify.com and connect it in the Online Store channel. Several confirm this keeps checkout under the same root domain and preserves Google Analytics sessions; consider redirects so direct visits to the checkout subdomain don’t expose an unstyled storefront.

Requirements/notes:

  • Typically needs Basic (not Lite) to connect a domain/subdomain.
  • Update the domain everywhere it appears in the embed code (sometimes twice).
  • Buy Button cart is separate by design; it won’t merge with a Shopify theme cart.

Open issues/mixed reports: One user says changing the domain now prevents the button from rendering; status unclear. Others report cart contents not persisting when navigating and difficulties verifying subdomains (e.g., Squarespace/Webflow DNS). FB Pixel behavior and a built-in “continue shopping” link remain unanswered.

Status: No official built-in feature; community workaround widely used but with caveats.

Summarized with AI on December 18. AI used: gpt-5.

This worked for me for the buy button. The only complaint I have is the item in the shopping cart doesn’t stay in the store’s shopping cart if you click off to somewhere else on the site.