For your domain to work with your VPS hosting, you need to point the domain to your server. There are several ways to do that.
Before You Continue! 🛑
The changes provided below should be made on your domain provider's website. For example, the platform your domain is pointed to via nameservers.
If you bought the domain from Hostinger, head to the VPS DNS Manager from the left bar of your dashboard and input your domain there.
The domain address will be detected, and you can proceed to the Domains dashboard to follow the next steps.
If you purchased your domain from another provider, you will find Hostinger's nameservers. You'll need to enter these nameservers into your domain provider’s settings.
To learn more, go to Managing DNS Records at Different Registrars
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 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 records that include @, www, or cloudflare-resolve-to in its name
Add the 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 |
Keep in mind that it may take up to 24 hours for the domain to fully propagate and point to the VPS 💡