I need to add a domain/IP record to my hosts file on a CentOS box running WHM/cPanel, so that a domain which has no public DNS is routed to the correct IP address.
I've done this on my macbook but I'm unsure of the process on cPanel.
When I nano /etc/hosts
I see the following:
# Automatically generated by OnApp (2.3.1)
127.0.0.1 localhost
1.2.3.4 s1.mydomain.com
So - if the contents of this file are automatically generated:
- Is it safe to edit this file manually - or will cPanel wipe my changes during updates etc?
- Does WHM/cPanel have an GUI for adding hosts records?
DNS Functions » NS Record Report
or mess withDNS Functions » Add an A Entry for Your Hostname
(or other spots) to see if your manual changes are wiped out or preserved. Going on a limb, i think you're safe to edit it, however as LaVar Burton says, "But you don't have to take my word for it...." (insert cPanel expert opinion in next comment hah)