0

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.tldbar.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?

10
  • Are both zones on the same DNS server? Feb 26, 2014 at 19:29
  • I'm not sure of what the difference would be but the solution needs to be general. Assume foo.tld and bar.tld have nothing to do with one another other than this single DNS record.
    – Indolering
    Feb 26, 2014 at 22:41
  • What is this about a website? Feb 26, 2014 at 22:49
  • @Indolering There's not going to be any "standard" way to handle this, unfortunately - the existing rtypes do not fit your use case. So you'll need to get creative, which is why I'm looking for more details about your environment. Do you control both zones? How about the DNS server itself? Feb 27, 2014 at 0:53
  • I'm asking because I am a contributor to Namecoin and a lot of people want to use their .com or .net addresses to transclude .bit addresses. I don't much around with the lower level DNS stuff (I'm developing a web application) and the lead devs are happy with the IP address hack. I want to let people use their home router or computer and still surf .bit addresses and exporting a DNS zone file is the first step. So, yes, both options are a possibility, perhaps you could enlighten me to the pros and cons of either solution?
    – Indolering
    Feb 27, 2014 at 2:07

1 Answer 1

2

I'd say you'll want to do some kind of setup where a DNS server is set up to answer the queries in a custom way that you define.

Take a look at PowerDNS's pipe backend, for instance - you can write a bit of code that will handle the resolution, doing the lookup against the desired domain and returning the translated records for responses to clients.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .