How to run two domain names pointing to one single name server?

Some times it happens that you have two domain name for your company. For example, you want to use both abc.edu.bt and xyz.edu.bt domain in your network. So how do you use it without having to change the nameserver IP.

1. Make sure both the nameservers of the domain is pointing to same nameserver IP in your ISP DNS zone files.

For example, the nameserver ns1.abc.edu.bt and ns1.xyz.edu.bt should point to 202.144.XXX.XXX(DNS Server)

2. You will need to create separate zones file for both the domain.
To keep it simple, the named.conf.local file would look as follows:

 zone "abc.edu.bt" IN {
        type master;
        file "/etc/bind/zones/abc.edu.bt.zone";
        allow-transfer { 202.XXX.XXX.XXX;
202.XXX.XXX.XXX; };
        };


zone "xyz.edu.bt" IN {
        type master;
        file "/etc/bind/zones/xyz.edu.bt.zone";
        allow-transfer {
202.XXX.XXX.XXX; 202.XXX.XXX.XXX; };
        };


zone "XXX.XXX.202.in-addr.arpa" IN {
        type master;
        file "/etc/bind/zones/202.XXX.XXX.rev";
        allow-transfer {
202.XXX.XXX.XXX; 202.XXX.XXX.XXX; };
        };

The config file show we need two separate files for the domains in use.

Hope this is helpful.

Comments

Popular posts from this blog

Solution to Moodle Error: Coding error detected, it must be fixed by a programmer: Failed to unserialise data from file. Either failed to read, or failed to write.

ACTION_FAILED:OU_INVALID: Solution for GoogleApps bulk user upload issue, username@domainname.com:ACTION_FAILED:OU_INVALID. This error is because you have not specified the Org Unit Path properly.

(Solved) (Fixed )MariaDB Unmet Dependencies on Ubuntu 20.04.