Is there a way to create a DNS record that fully mirrors another website? Which is to say, *.foo.tld/*
maps to *.bar.tld/*
so any query for foo.tld
will be served up by bar.tld
but the DNS will appear to be the exact same.
I thought that the answer was just to use DNAME,
The DNAME record provides redirection for a subtree of the domain name tree in the DNS. That is, all names that end with a particular suffix are redirected to another part of the DNS.
However, if you read further down in the spec,
If a DNAME record is present at the zone apex, there is still a need to have the customary SOA and NS resource records there as well. Such a DNAME cannot be used to mirror a zone completely, as it does not mirror the zone apex.
Which means that while you CNAMEs/subdomains will work, foo.tld
≠ bar.tld
. You need to use a nameserver and other server-side tricks for full domain name transclusion. If you have a dedicated IP address for bar.tld
, you can set DNAME to handle all of the subdomains and point foo.tld
to the same IP address but you have to have a dedicated IP address.
Is there ANY way to fake this (using any combination of DNS entries) without having to use a dedicated IP address?