When you create a new website, you probably buy a domain and a hosting service. Assume that the host is a house, so the domain is its address. However, the address will be meaningless when it is not pointing to any house. So, your next step is to pointing your domain to the host to make your website can run.
Before taking any action, you must sure that:
- You did buy a domain and have an account to manage your domain on the site where you bought it. If you’ve had no one, follow this.
- You did register a hosting service and get the hosting information via email. You might buy a hosting service or get a free one. It’s up to your needs.
Then, let’s point your domain to your host.
Step 1: Login Your Account on the Site Where You Bought Domain
Login by the account which you used to buy the domain. In your account page, there is a menu named DNS besides your domain name.
Click there to go to the DNS Management page of your domain like this.
Step 2: Provide the Host Information for the DNS Management
In this step, you have two options: Fill in the fields the nameservers or IP of your host.
Both kinds of information were sent to your email right after you got a hosting service. You may fill any one of two kinds to the DNS Management page.
Option 1: Point Domain to Host by NameServers
On the DNS Management page, scroll down and look for the NameServers section then press the Change button.
Choose the Custom option.
Two blank fields will appear to fill in the information about your host. Get the nameservers of your host which you had in your email and fill in these fields. They might be NS1.ecample.com and NS2.example.com.
Finally, press the Save button to finish.
You probably wait for 30 minutes, even 48-72h depending on your hosting service. When your website is updated with the new DNS information, it means that you completed the task.
Option 2: Point Domain to Host by IP Address
On the DNS Management page, go to the Records section which has the look as below:
Each line is called a record. So, you press the Add button to add a record in A-type, then fill in information for that record.
- Host: Fill @ or # in this field, normally we use @;
- Points to: fill in the IP address of your host which provided in the email;
- TTL: you should let it be the default value.
Now, save the record.
Step 3: Point the Domain With www to Your Host
You probably are confused between example.com and www.example.com. Actually, these two kinds of domains operate independently. If you did not set up one of them, users could not access your website from one.
So, we should create another record in the type of CNAME (Canonical Name) to create a sub-domain which is your domain with www for your site.
In the Records section, press the Add button and choose the type is CNAME.
- Host: fill in your sub-domain with www there, eg: www.example.com;
- Points to: fill in your domain without www or the IP of your host;
- TTL: let it be as default.
Save the record then you get done.
Now, you’ve finished pointing your domain to host already. But, for your quick execution, remember to save your both hosting information and domain account. Missing one of them, you can not make your website run.
Hope you find this is useful in your building website progress. Good luck!