Add the own custom subdomains to an existing domain name with the own DNS server

domain-name-systeminternal-dns

Summary

Is it possible to add some custom subdomains, for an existing domain name that's hosted on another DNS, for our internal DNS?

Details

Currently, our developers at our office hack their own host files by adding in some custom subdomains like the following :-

  • 192.168.0.100 dev.www.foo.com
  • 192.168.0.100 dev.foo.com

and we own the domain foo.com BUT it's not hosted by us, but a 3rd party.

BUT, we do have an internal DNS server which is mainly being used as a CACHE server. Of course, we can add our own forward lookup zones. But if I do that, I'm afraid that all the EXISTING data for that real zone will not be used.

eg. imagine the zone foo.com has the following (but I don't know about it)

  • www.foo.com
  • hello.foo.com
  • goodbye.foo.com

if I don't add that data to the zone, then when a user tries to access that domain .. it will not resolve. (and lets not talk about keeping the zone manually up-to-date … cringe!)

So! is it possible to inherit (ack – my programming hat snuck back on) or to copy or sync a domain … and then I manually add those 2 extra subdomains in for that zone .. but of course unless a person knows to use my internal DNS … they will never been available to anyone.

Is this possible?

Best Answer

You can do it if you are willing to change your layout a bit. I would do something like dev.foo.com then under it have www.dev.foo.com. Or you could do something like project.dev.foo.com and then www.project.dev.foo.com.

Another option would be to do something like project.dev internally (i know i know, making up TLDs is not cool, but it works and well it works). Or if you want to be kosher get a separate dev domain and test against that.

Another option is to just add the dev entries to your public dns.


Actually just thought up another hack that might work, but would require some manual intervention.

  1. Create a zone www.foo.com
  2. set the @ record to your public www.foo.com IP
  3. create a host dev.www.foo.com
  4. create a zone dev.foo.com
  5. set the @ record to your dev instance.

This way your DNS server will only think it's authoritative for www.foo.com, dev.www.foo.com and dev.foo.com and pass anything else under foo.com to the outside DNS servers.

It's a hack, and you'll have to manually update the @ record for www when it changes, but it'll work

Related Topic