#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2008
    Location
    Michigan
    Posts
    11
    Rep Power
    0

    Subdomain(s) in main zone file


    It has been suggested to me that I might want to put the sub domains we have into the main zone file. I have been unable to find any good documentation on how to do this and whether it would be a good idea (my personal opinion is it wouldn't be). Thoughts?
  2. #2
  3. They're coming to take me away

    Join Date
    Jan 2005
    Location
    Florida
    Posts
    5,105
    Rep Power
    5049
    Originally Posted by Eremius
    It has been suggested to me that I might want to put the sub domains we have into the main zone file. I have been unable to find any good documentation on how to do this and whether it would be a good idea (my personal opinion is it wouldn't be). Thoughts?
    Welcome to Dev Shed.

    What's wrong with putting subdomains in the main zone file?

    All you need to do is add an A record for the subdomain:
    www.domain.com. IN A xxx.xxx.xxx.xxx.xxx
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2008
    Location
    Michigan
    Posts
    11
    Rep Power
    0
    Originally Posted by hiker
    Welcome to Dev Shed.
    Thanks!

    Originally Posted by hiker
    What's wrong with putting subdomains in the main zone file?

    All you need to do is add an A record for the subdomain:
    www.domain.com. IN A xxx.xxx.xxx.xxx.xxx

    Rereading my post, I didn't mean to imply it was a bad idea do merely that it's working now and I was trying to find out if there was a benefit to doing it in one file.

    So the zone file would look something like:
    Code:
    $TTL 86400
    @	IN	SOA	ns1.example.net. hostmaster.example.net. (
    	2008061901 	; serial
    	3h      	; refresh after 3 hours
    	30m       	; retry after 30 min
    	7d	     	; expire after 1 week
    	1d			; minimum TTL
    )
    
    ;
    ; Name Servers
    ;
    @			IN	NS		ns1.example.net.
    
    
    ;
    ; Subdomains
    ;
    sub1			IN	NS		ns1.example.net.
    
    ;
    ; Fixed Addresses
    ;
    @			IN	A		xxx.xxx.xxx.xxx
    test.sub1.example.net  IN  A  xxx.xxx.xxx.xxx
  6. #4
  7. They're coming to take me away

    Join Date
    Jan 2005
    Location
    Florida
    Posts
    5,105
    Rep Power
    5049
    More like this:

    @ IN NS ns1.example.net
    @ IN A xxx.xxx.xxx.xxx
    sub1 IN A xxx.xxx.xxx.xxx

    The domain itself needs to point to the nameservers... the domain as well as subdomains (sub1, mail, ftp, etc) point to the IP address.

IMN logo majestic logo threadwatch logo seochat tools logo