For your domain to work with your VPS hosting, you need to point the domain to your server's IP address. There are several ways to do that.
Domain purchased at Hostinger
If you purchased the domain at Hostinger, go to the Domain portfolio page on hPanel, click on Manage next to your domain, and select DNS / Nameservers from the left sidebar of the domain dashboard. And then follow these options:
Option 1 – Create A records
The easiest way to point your domain to your VPS is to create A records:
Find the IP address of your VPS.
Access your domain's DNS zone, and delete any A, AAAA or CNAME records that include @, www, or cloudflare-resolve-to in its name.
Add these two A records:
A Record 1 | A Record 2 |
Name: @ Points to: your VPS IP address TTL: default | Name: www Points to: your VPS IP address TTL: default |
Option 2 – Create A and CNAME records
Find the IP address of your VPS.
Access your domain's DNS zone, and delete any A, AAAA or CNAME records that include @, www, or cloudflare-resolve-to in its name.
Add the following A record along with the CNAME record:
A Record | CNAME Record |
Name: @ Points to: your VPS IP address TTL: default | Name: www Points to: your domain name (e.g., example.com) TTL default |
Remember that domain propagation may take up to 24 hours before fully pointing to the VPS.
Domain purchased elsewhere
If you purchased the domain elsewhere, go to the VPS page on hPanel, click on Manage next to your server, and select DNS Manager from the left sidebar of the VPS dashboard.
Next, enter your domain name and click on Add:
You'll need to enter these nameservers into your domain provider's settings.
Before you continue ✋
The nameservers changes should be made on your domain provider's platform; that is, where your domain nameservers reside.
If you would like to learn more, please refer to this guide: Managing DNS records at different registrars.