How to link the domain to hosting, and make the settings correctly

If you purchased or intend to purchase the domain for your website from “X” company , while you purchased the hosting from “Y” company , it is important that you link the domain to the hosting so that your site is launched to users.
This article is completely suitable for you and will answer all the questions that arise in your mind, so that the linking process is completed correctly and your site is ready to work.

The importance of linking the domain to hosting

Of course, a domain is just a link that refers to the space that contains the files, data, and content of your entire site, while hosting your site without linking it to a domain cannot access its content quickly and securely.
Therefore, the step of linking the domain to the hosting is an important step in order for the user to be able to access your site hosted on one of the hosting companies in a safe and fast manner. 

Note : You certainly will not need to take the steps to link the domain to the hosting if the domain and hosting are on the same service provider, and we will explain that throughout the article. However, if the domain is from one company and the hosting is from another company, it is important that you direct the domain to the server.


Steps to link a domain to hosting 

Suppose you purchased hosting from Namecheap while you purchased the domain from Hostinger, you will do the linking process as follows

1- Add the domain to the list of domains within the hosting control panel 

The first step in order for us to add the domain to the list of domains in your account with the hosting company, which is namecheap in this case, is to enter the Cpanel control panel, where you can enter cPanel through the login data that you obtained after registration, as follows:

Or you can log in to your account with the hosting company “Namecheap”, then search for the products page, which you will find under the heading “ product list ”, and then click on “ Hosting ”.

After clicking on Hosting, your hosting data will appear to you and next to it is the “Go to Cpanel” button . Click on it to be directed to the hosting control panel.

After entering directly into the hosting control panel, you will find an option in the control panel menu called “Addon domains ,” click on it.

A page for adding or linking a domain to your hosting will open, and it will be as follows:

  • New Domain Name : It is the link or domain that you want to link to the hosting, such as www.example.com 
  • Subdomain: This field is if you own a subdomain from the main domain, such as: blog.example.com and you want to link it to hosting.
  • Document Root: This is if you want the domain to be linked to a path or an internal folder in your hosting, for example example.com/blog, this means that the domain will be directed to the blog folder inside your site, but if you want it to be linked to the main path within the file manager, leave it. Empty.
  • FTP Account: This field helps you create an FTP account that allows you to connect to the hosting file manager using those files. 

2- Add the hosting company’s domain servers to the domain manager’s account

As you can see, it is a reciprocal process, as we logged into our account with the hosting company Namecheap and added the domain there. We are now doing the opposite, which is adding the hosting data, which is called name servers, to our account at the domain company Hostinger in this case. 

The first step : Obtaining the hosting server data for the domains, or what is called name server data:

You can obtain name servers data in different ways, the simplest of which is through the email that you received from the hosting company after purchasing hosting directly from them, where you will find name servers data sent to you as follows: 

As you can see, this is the name servers data that we need in order to add it to our domain account, and it is arranged as follows: 

  • The first is Nameserver 1 and its value is: dns1.namecheaphosting.com
  • The second: Nameserver 2 and its value: dns2.namecheaphosting.com

If you do not have access to the email that contains the NameServers values, you can easily find the nameservers of the hosting company you deal with, as they are fixed data and you can obtain them online, where you enter Google and type “Hosting Company nameservers list” with Hosting company replaced In the name of the company you are dealing with. You can also write to the technical support of the hosting company and request nameservers data from them.

The second step: Enter the name servers data into your domain manager account at the domain company Hostinger. 

First, you must log into your account with the domain company that you purchased from, and search for the “Domain list” tab. To display your domain data, for example , www.example.com, next to the manage button: 

Click on the “Manage” button to be directed to the page for managing your domain information and data. On this page, you will look for the option to modify the DNS or Name server, such as the one shown in front of you in the following image:

  1. Click on DNS / Nameservers 
  2. Click on Change nameservers 
  3. Enter the DNS data that we previously explained how to obtain.

After entering the data in the previous way, click “ Save ”. 


If the domain and hosting are on the same service provider (hosting company) 

 If the domain and hosting are on the same company, for example you purchased the domain and hosting from Namecheap, in this case you will not need to do the steps we explained above, but just make sure that the Nameservers value indicates the name of the company hosting the site. In this case, Namecheap web host DNS appears, which is the value for Namecheap. 


common questions

How long does the process of linking a domain to hosting take? 
After performing the process of linking the domain to the hosting, as we explained above, usually after an hour or a few hours, perhaps up to 24 hours, in order for the linking process to be completed 100% correctly, and the domain name begins to indicate the content of your site on the hosting. 

How do I ensure that the connection process is completed correctly?
After you perform the linking process as we explained above, open the command box from your computer, by pressing Start and typing CMD. 

You will notice that the black screen of the command box appears. Type the Nslookup command in it and then press enter. 

After that, also type the following command: set type=ns, taking into account the spaces exactly as written, then press enter again. After that, type your domain name and press enter:

As you can see in the picture, after applying the steps, the names of the nameservers will appear if the process of linking the domain to the hosting was completed correctly. 

Is it necessary to purchase an SSL certificate for the domain? 
It is certainly important that your site is signed with the famous SSL certificate, which makes your site’s communications with visitors safe and confidential, which enhances the security of your site. You can view a detailed guide regarding the SSL certificate and its benefits for your site. 

How do I get a .com domain? At the cheapest price possible? 
You can get a domain and a .com domain. At the cheapest possible price, which is only 1 US dollar, from Ionos , a subsidiary of United Internet, which provides global domain services. 

In the end, we hope that the explanation is complete and adequate for how to connect a domain to hosting properly. If you have any additional inquiries or questions, do not hesitate to write them below the article in the comments box. We advise you to ensure that the linking process was completed correctly through the method we explained above, and if the linking process is delayed for more than 24 hours, you can contact the technical support of the hosting company to ensure that there is no problem regarding linking the domain to the hosting

Avatar photo
I am a young man who has been working in WordPress and e-marketing for 10 years. I would like to share my experience with you so that we can become professional in WordPress I will be happy to share the experience with you.