Introduction

Nameservers are essential for DNS resolution and allow domains to point to the correct server. In rare cases, nameserver entries may be missing from the server configuration. When this occurs, the nameservers must be manually added to ensure proper DNS functionality.


Prerequisites

  • Root SSH access to the server
  • Access to DNS zone management
  • Administrative access to the server

Implementation

Step 1

Create a DNS zone for the nameserver hostname if it does not already exist.


Step 2

Add an A record for the nameserver and point it to the appropriate IP address.


Step 3

Log in to the server via SSH as the root user.

For cPanel servers, the nameserver entries are stored in the following file:

/var/cpanel/nameserverips.yaml


Step 4

Add the required nameserver entry to the file using the following format:

nameserver_name: IP_address

Example:

ns1.domain.com: 192.168.1.10

ns2.domain.com: 192.168.1.11


Step 5

Save the file after adding the appropriate entries.


Step 6

Restart cPanel services to make the new nameserver entries active.


Step 7

Verify that the newly added nameservers are resolving correctly.


Conclusion

If nameserver entries are missing from the server, they can be manually added by creating the necessary DNS records and updating the nameserver configuration file. Once the entries are added and cPanel is restarted, the nameservers should begin resolving properly.

Leave a Reply