All Collections
VPS
Getting Started
How to Point a Domain to Your VPS
How to Point a Domain to Your VPS

Pointing domain to your virtual private server

Updated over a week ago

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.

NOTES

Option 1 – Create A Records

The easiest way to point your domain to your VPS is to create A records:

  1. Access your domain's DNS zone, and delete any A records that include @, www, or cloudflare-resolve-to in its name

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

  1. Access your domain's DNS zone, and delete any A records that include @, www, or cloudflare-resolve-to in its name

  2. 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., domain.tld)

TTL: default

Option 3 – Specify Child Nameservers

If you choose any of the options above, your domain will keep using its old nameservers.

If you wish to use your own – custom – nameservers, e.g., ns1.domain.tld and ns2.domain.tld, you can create child nameservers:

  1. Make sure that your VPS has a functional DNS zone (especially if you run VPS without a template); if the DNS zone is not set up yet, follow this tutorial

  2. Create child nameservers; make sure to create A records for your new nameservers as well

Once you make any changes in your domain's DNS zone, propagation will start. This process can take up to 24 hours. During this time, it's expected that your website won't work, but give it some time, and it will get online soon.

Did this answer your question?