How to rectify the DNS conflict issue if server Hostname is set as domain name instead of any sub-domain name?

bhawanisingh

Administrator
Staff member
Today, we will learn how to resolve the the DNS conflict issue if server Hostname is set as domain name instead of any sub-domain name.
Current scenario:
Hostname set on server is: hoststud.com
Domain added on cPanel server is: hoststud.com


Now the issue is, DNS(A,MX,CNAME) records are not getting read from server due to some conflicts in Named file.

How to resolve and overcome this situation?

First, you have to change the hostname through:
# hostnamectl set-hostname server.hoststud.com
or
# cat /etc/hostname
here, i have set new hostname as 'server.hoststud.com. You can set as per your need.

Now, to make these changes take effect we have to reboot the server.
# reboot

once server get started you can confirm for the server hostname through:
# hostname

Now, still you will find issue with the DNS as entries are there in cPanel files. So to overcome this we will forcefully update the cPanel through:
# /scripts/upcp --force
OR
Login to WHM >> "cPanel" >> "Upgrade to Latest Version" >> check "Force a reinstall even if the system is up to date" >> click "Click to Upgrade" .

Boom! DNS issue is gone now.
 
Top