Providers like Firebase Hosting use the Host
header name of the incoming request to determine which customer's content to serve. If other people change their DNS to point to www.test.com
, the Host
header will still be populated based on the domain they provided.
To make a website serve the same content regardless of domain, you need to either:
- Host the content on a dedicated IP address such that the
Host
header doesn't matter (this is not possible with Firebase Hosting) or
- Have all connecting domains proxy to
www.test.com
as opposed to directly setting DNS and include a Host
header of www.test.com
when they forward traffic.
In general services where you need to manually configure a custom domain (e.g. Firebase Hosting, Heroku, etc) are not going to support arbitrary other domains pointing to them without an additional layer in between.