0

I manage an authoritative DNS server for my organizations DNS.

We recently purchased additional domain names which end in a different domain than the one my organization has.

For example, my organizations domain is AAA.GOV.CA (www.aaa.gov.ca, ftp.aaa.gov.ca and so on)

Due to management issues, we were required to purchase domain names that end in .COM such as mike.com, david.com etc.

I need to point all the new domain names to my main web server, which I will do using the CNAME, so

mike.com  IN CNAME www.aaa.gov.ca
david.com IN CNAME www.aaa.gov.ca

And so on.

Can I add these domain names to my authoritative named file for my AAA.GOV.CA or do I have to create another zone for .COM and define them in there ?

I searched the previous questions, but didn't find anything which is similar to mine.

We are running BIND version 9.

Patrick Mevzek
  • 9,921
  • 7
  • 32
  • 43
  • You need to define them in the zone they are a part of, not a random separate zone that also happens to contain hosts listed in the data section of a CNAME. –  Jul 11 '19 at 13:50
  • The problem is, that I do not have a .com zone, just one for the aaa.gov.ca zone, and it seems I can't mix two domain suffixes in one zone, so I will havwe to create a new zone for the .com which will have the pointers to the main web site that is defined in the main zone. Thank you for your response. – Mike Glassman Jul 14 '19 at 04:55

1 Answers1

1

While it isn't possible to mix domains within the same zone file, it is certainly possible to use a single zone file for multiple domains, if all those domains share the same DNS entries.

For example:

@     IN   A   10.10.0.5
www   IN   A   10.10.0.5
ns    IN   A   10.10.0.2
ftp   IN   A   10.10.0.8

Using that (partial) zone file for all your domains would result in:

AAA.GOV.CA has the same IP as MIKE.COM and DAVID.COM
NS.AAA.GOV.CA is the same as NS.MIKE.COM and NS.DAVID.COM
FTP.AAA.GOV.CA is the same as FTP.MIKE.COM and FTP.DAVID.COM
WWW.AAA.GOV.CA is the same as WWW.MIKE.COM and WWW.DAVID.COM
...etc...

If that is not an acceptable setup, then you will need to create a separate zone file. From what you describe, it sounds like two zone files would suffice:

  • one zone file for AAA.GOV.CA with full entries, and real A records
  • one zone file that is used by both MIKE.COM and DAVID.COM that contains CNAME references into the AAA.GOV.CA zone
Jim L.
  • 655
  • 4
  • 11
  • 1
    Perhaps also mention how to `$INCLUDE` this snippet from your zone files containing the `SOA` record (and other records that differ between the zones). – Tommiie Jul 12 '19 at 07:10
  • Thank you very much. I had a feeling that this is what I would have to do, so I will wait till my server admin is back from leave and create the new zone for the .com – Mike Glassman Jul 14 '19 at 04:52