How to add DNS record in Ubuntu/Linux

Point domain to unmanaged VPS/Dedicated server or add any DNS record in Ubuntu/CentOS

To serve DNS records we need to install DNS server package like BIND9
Update Package manager “apt-get update” or CentOS “yum update”

Install BIND9

or CentOS

Configure and Create Zone File for domains to add records
open file name.conf.local and insert zone file name for domain

save and close file.

Create Zone File for domain

To create name server and added NS and A records. replace with server IP

Now add and as child nameserver in domain register panel and also add in nameserver address in domain register.

To add another domain to same vps

Published by


Software Engineer, Full Stack Developer