How To Assign Domain Name To Ip Address In Linux. And restart hostname service. If you dont have any available public IP addresses listed you need to create one.
You can register a domain yourself if the you know the IP you want to use and the domain is available. People often forget the process for assigning an IP address static or dynamic from the Linux command line. Then in etcresolvconfresolvconfdhead youll add then line domain yourdomainname not your FQDN just the domainname.
You can consider your host as being local to several domains.
In that section comment the original line and write your own directive below that line. Once you have registered the domain name you will gain access to an administrative panel like this one shown below where you will be able via A records to redirect the domain name and all. Interface name IP netmask and default gateway. You need to register a domain name then set up DNS records including an A record that points the name to the IP address on nameservers somewhere and that IP address has to be accessible from the net.