If you are a company dedicated to hosting your clients’ websites, you will surely be interested in having the option of custom DNS so you can manage it from the same panel where you created the web spaces.
To achieve this is very simple, you only need to create two A records for ns1.yourdomain.com and ns2.yourdomain.com and configure them correctly.
Important
To continue with this tutorial you must have ports 53 TCP and 53 UDP open in your server’s Firewall profile. If they are not open, you can follow this tutorial: Open port 53 to use custom Name Servers
Configure custom NS
The first thing you need to configure on your main domain or the domain used to identify your custom NS, is to go to the NS configuration section of your domain provider.
If you don’t know where this section is, contact your domain provider so they can tell you how to change it. It is important that you tell the provider to create the Glue Records as follows:
- ns1.yourdomain.com (server IP)
- ns2.yourdomain.com (server IP)
You must configure these NS on the domain. Obviously, replace "yourdomain.com" with the domain you want to use and the server IP will be the public IP of the Plesk or VestaCP server.
Finally, you should check with intodns.com that you get this result:
Once the domain correctly responds to the configured NS, it is time to configure the server.
Configure DNS records in Plesk
Generally, when you add a new domain in Plesk, by default it already configures the DNS zone with pointers for ns1.yourdomain.com and ns2.yourdomain.com.
If you already have the domain created, you should configure the DNS zone as follows in Domains > Click on the domain > DNS Settings:
Important
You may not find the DNS Settings icon in Plesk. This is because Plesk does not install with a DNS service by default. In that case, you should enable "BIND DNS server".
Configure DNS records in CPanel
Generally, when you add a new domain in CPanel, by default it already configures the DNS zone, but you will need to add the pointers ns1.yourdomain.com and ns2.yourdomain.com.
To do this, expand the DNS Functions option and go to DNS Zone Manager. Once there, click the Manage button to administer and add DNS zones:
Now add the A records for ns1.yourdomain.com and ns2.yourdomain.com:
Configure DNS records in VestaCP/HestiaCP
In VestaCP/HestiaCP the first thing you need to do is edit the user you use to log in to HestiaCP.
Remember
Keep in mind that this procedure must be done with a user other than admin, since with the admin user it is not possible to add websites for security reasons.
Edit the user by clicking the pencil icon and then click the Advanced options button and edit Default Name Servers:
Now go to Web > Add Web and configure your domain checking the Support DNS option:
Finally, go to the DNS section and modify the DNS zone for your domain. You must add the A records for ns1.yourdomain.com and ns2.yourdomain.com:
Finally, your DNS Zone should look like this:
If you have any questions that are not fully answered in this article, remember you can always contact support.