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:

Option 1 - A record

The easiest way of pointing your domain to VPS is via A records, the procedure is as follows:

  1. Get your VPS IP

  2. Navigate to your domain DNS Zone and delete any A records that include @, www or cloudflare-resolve-to in its name

  3. 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

  1. Get your VPS IP

  2. Navigate to your domain DNS Zone and delete any A records that include @, www or cloudflare-resolve-to in its name

  3. 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:

  1. 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

  2. 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.

Did this answer your question?