I have a domain registered with Godaddy and I am setting up a dedicated server for learning purposes. I want the server's hostname to be resolvable. I created custom NS records (ns1.mydomain.com & ns2.mydomain.com) with Godaddy pointing to my server ip. I edited the /etc/hosts files and /etc/sysconfig/network to use the hostname abc.mydomain.com. But I am unable to resolve the hostname to ip address. Please help me step by step considering I am a total noob.
1 Answer
If you goal is to have a resolvable hostname without having to install & configure a DNS server on your box you should use GD DNS servers. (not a fan of GD either btw)
So instead of pointing your domain to ns1.yourdomain.com & ns2.yourdomain.com point your domain to GD nameservers and add hostname A record. The steps of adding an A record are outlined here: https://support.godaddy.com/help/article/680/managing-dns-for-your-domain-names
abc.mydomain.com
to point to your server.