How to: set up a domain name
Nameserver this, DNS record that...
There are a lot of articles out there, but I personally found this process confusing. Here’s my attempt at clarifying it for Future Me and others.
Why you'd need to know this
If you want to set up a website with your own custom domain name, or you're moving your website to a different webhost and need to keep the same domain name, or you're changing your domain name to something, or something similar...
If you're situation matches
If your domain name is registered at the same place where you are hosting your website, please follow the instructions provided by your webhost. They should be straightforward.
However, if your website is hosted in one place and your domain is registered in another place, read on…
For example, maybe your domain name is registered at GoDaddy.com, Namecheap.com, Google Names, or another popular registrar.
And then maybe your website is hosted at bluehost.com, squarespace.com, etc.
1. Nameserver setup
First, find the nameserver names from your webhost. They are usually
X is the numbers
3 for three nameservers total (though technically only at least 2 are required).
Set those nameservers with your domain registrar.
While the UI clicks should take no more than a few minutes, it will take several hours to fully propogate across all DNS systems for a consistent user experience across the world.
You should also be able to see your nameserver change when searching for your domain name via WHOIS lookup:
whois <example domain.com>
- Linux: same after installing
sudo apt-get whois
- Browser: https://whois.domaintools.com/ and other similar sites
2. DNS Record setup
DNS stands for Domain Name System. It is a decentralized system that maps (human-friendlier, like
example.com) domain names with IP addresses (such as
After setting up the nameservers, go to the place where your nameservers live – in this scenario, it is where your webhost is,
Here, you can add whatever DNS records you need.
For me, I needed to set up an A Record to point my domain name to my website’s IP address.
Again, the initial process should be a few minutes, but may take several hours to fully propagate across the Internet. For me, once I actually had all my nameserver and DNS record settings set up properly. it took 4-6 hours for me to see the change on my end. Across all DNS servers, it may take another 24-72 hours.