All things Shopify and commerce
Hi - we have a headless Shopify store, with the checkout on the store's myshopify.com domain. I've switched the primary domain of the online store to a custom domain and the 'online store' channel and checkout successfully appear on the custom domain. But, when a customer is sent to the same checkout from the headless store the checkout domain is still myshopify.com. Can custom domains be applied to the checkout for headless channel customers?
Solved! Go to the solution
This is an accepted solution.
H - we're using the JS Buy SDK (https://shopify.github.io/js-buy-sdk/#creating-a-checkout). The client is initialised with the store's myshopify.com address, but I don't believe it'll accept a custom domain. Shopify support have confirmed that the myshopify.com URL should redirect to the primary domain, but don't know why it isn't. In the end I've had to manually rewrite the checkout URL, replacing myshopify.com with the primary domain, before the customer navigates to the checkout which is working fine. Thanks very much for your thoughts.
Did you try to use another browser to checkout after connect your 3rd party domain in Shopify and mark it as the main domain in your store?
- Helpful? Like and Accept a solution. - Donate: Buy coffee ☕- or Paypal me ❤️
- Ryviu - Product Reviews app, collect consumer photo reviews, import reviews from AliExpress, Amazon, Etsy, Shoppe and Walmart and CSV.
- Lookfy app: Create Image Lookbook, Photo Gallery with product hotspots
- Enjoy 3 months of Shopify for $1/month. Sign up now
Thanks - yes, I've tried different browsers, incognito mode, completely new devices and cleared cookies/cache, but it still appears on myshopify.com when accessed via the headless channel.
Hello @nathangaw,
Can you please clarify - you actually use 2 websites: one on the main domain where some customers sell everything natively inside Shopify and another one on a separate domain where you are using a headless Shopify installed cart and then want to direct a customer to a first mentioned instance's domain?
Best regards,
Anastasia
Hi - we have a Shopify instance with a primary domain of store-checkout.clientdomain.com. We don't use the online store, but the online store loads fine on the primary domain. The checkout also loads on the primary domain if accessed from the online store.
The store we actually use is a Next.js build, using the Shopify SDK, on store.clientdomain.com. The SDK generates checkout links, but when the checkout is accessed from the headless store it renders on myshopify.com. The myshopify.com domain is set to redirect to the primary domain, which works fine everywhere, unless the checkout is accessed from the headless store.
I'm trying to resolve with Shopify support, but their first question was 'what's a headless store' which doesn't fill me with confidence!
Many thanks
Nathan
Hello @nathangaw,
I suppose you are using a method/function ShopifyBuyInit().
Are you passing the domain variable inside so it looks like next:
function ShopifyBuyInit() {
var client = ShopifyBuy.buildClient({
domain: "checkout.domain.com",
Best regards,
Anastasia
This is an accepted solution.
H - we're using the JS Buy SDK (https://shopify.github.io/js-buy-sdk/#creating-a-checkout). The client is initialised with the store's myshopify.com address, but I don't believe it'll accept a custom domain. Shopify support have confirmed that the myshopify.com URL should redirect to the primary domain, but don't know why it isn't. In the end I've had to manually rewrite the checkout URL, replacing myshopify.com with the primary domain, before the customer navigates to the checkout which is working fine. Thanks very much for your thoughts.
User | RANK |
---|---|
42 | |
42 | |
34 | |
24 | |
21 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023