I am wondering how sites like Google sites and shopify allow customers to create a website and then link it to their own domain?. Google sites allow a user to create their own website, at a user supplied domain, and shopify allows a user to create their own e-commerce site - once again, they can supply their own domain to be used to access the webshop created.
In both cases, the website is ostensibly accesed by typing the users domain name in the browser, although the website is actually being hosted by a third party company (Google, Shopify etc)
How is this possible. Does anyone have an insight into how this is (likely) being done?