How to Point a Domain Name to Your Website
For the website to be globally accessible by the users or visitors, you need to connect the domain name which we purchase from a domain registrar and the website hosted in the hosting account you purchase from the web hosting provider.
There are basically 4 types of web hosting: Shared hosting, Reseller hosting, Virtual private servers and Dedicated servers. You can refer our comprehensive web hosting buyers guide for detailed reference regarding the types of web hosting.
This guide is assumes that you already have:
- Purchased a domain name from a domain registrar.
- Purchased a web hosting account (Shared or Reseller) or setup a hosting space in your own VPS/Dedicated server.
- Uploaded the website files to the Document Root or data directory of the website in the server or hosting account via FTP or via Hosting control panel.
Now the only process left to make the website online is to link the domain and the hosted website. For this you need to do the following.
Get the name servers of the web host
When you sign up with a hosting provider and purchase a web hosting account, you should receive a new account information email. All the login credentials (control panel, FTP) and the name server details should be present in that mail. If you are unable to find it, just contact your web hosting support and ask.
Specify these name servers in the registrar end
After receiving the name servers of the web host, you need to update them as the authoritative name server of the domain in the domain control panel provided by the registrar. Once this is set, all the DNS records of the domain will be queried in these name servers in the time of name resolution.
Specify the DNS records in the zone file of these name servers (to be done in web hosting end)
This should be done by default when a web hosting account is created using control panels like cPanel, Plesk, Virtualmin etc.
But if you are hosting your website in a VPS or dedicated server without any control panel, you’ll have to create a zone file for the domain in the name server and add DNS records in it.
Once the DNS records are added, IP and other records would be fetched from these name servers at the time of name resolution.