1

I checked this question, but it does not solve my issue.

I'm using BIND on Debian Jessie, and I am the authoritative person for subdomain.example.com. I have a new subdomain that I want to point to, subdomain2.example.com. I am not figuring this issue out.

I want subdomain2.example.com to point to an IP address, but I do not have control over example.com's name servers. I want to make the change locally, so we can setup the site before making it go live to the rest of the world. How can I do this when I don't have that zone yet?

1 Answers1

3

You can't add entries for other domains to your existing zone, that will generate an warning/error message in Bind for your zone file regarding out-of-zone data:

subdomain.example.com.:line-#: ignoring out-of-zone data (subdomain2.example.com.)

But you don't have to be the actual owner of a domain or zone to make your own name server act authoritative for it. That is not best practice, but since it will only affect your own users, it won't break the internet for anyone else either.

Simply create an additional zone for subdomain2.example.com. and set up the A (and any other records) with the ip-address you want.

dmourati
  • 26,498
HBruijn
  • 84,206
  • 24
  • 145
  • 224