Before your domain can work with your VPS hosting, you need to connect the domain and server by pointing the domain to it. No worries as it’s very easy, and there are quite a few options for that.
NOTES:
Changes should be performed from the service, where you have your domain pointed to by Nameservers
Option 1 - A record
The easiest way of pointing your domain to VPS is via A records, the procedure is as follows:
Get your VPS IP
Add these two new A records
A record 1 | A record 2 |
Name: @ Points to: your VPS IP TTL: Default | Name: www Points to: your VPS IP TTL: Default |
Option 2 - A and CNAME records
Get your VPS IP
Add this A record along with this CNAME record
A record | CNAME record |
Name: @ Points to: your VPS IP TTL: Default | Name: www Points to: your domain name (for example domain.tld) TTL: Default |
Option 3 - Child nameservers
If you chose one of the options above, your domain will keep using its old Nameservers. If you wish to use your own Nameservers, like:
ns1.domain.tld
ns2.domain.tld
Then child nameservers are the way to go, procedure is as follows:
Make sure your VPS has got a functional DNS Zone (especially when you are running VPS without a template). In case DNS Zone is not set up yet, follow this tutorial first
Create child nameservers (make sure to create A records for your new nameservers as well)
Any DNS Record changes trigger propagation, which can last up to 24 hours to fully propagate.