I'm building a shopify-like application. right now when a customer creates a store, he gets some subdomain like https://customer1.shopify-like.com
My Shopify-like frontend application hosts on AWS/ec2 and built with react.js. So, when you visit customer1.shopify-like.com my Nginx(ec2) configuration catches all *.shopify-like.com and load the same react-application (proxy_pass to http://frontend:80, all services up by docker-compose).
and it works fine.
the question is how to allow my customer to configure their own domain as Shopify does. [docs link][1]
Set up your existing domain to connect to Shopify If you've purchased your domain through a third party, then you need to edit the following DNS settings:
Your A record should point to Shopify's IP address, which is 23.227.38.65 Copy
Your www CNAME record should point to shops.myshopify.com Copy.
why Shopify asks you to set CNAME to shops.myshopify.com? what's the proposal?
should I ask my customer to configure CNAME to customer1.shopify-like.com and A Record to my ec2 IP?
if yes, why? because if they just configure the A Record to my ec2 IP. could I catch all requests with Nginx and proxy_pass to my frontend app?
[1]: https://help.shopify.com/en/manual/domains/add-a-domain/using-existing-domains/connecting-domains