There are 2 approaches to point your domain to your VPS server:

  1. Configuring your own DNS software, to use for hosting the domain DNS on your own VPS.
  2. Using an external DNS service to host the domain DNS with another DNS service provider.

Of course, the second approach is the best one to consider, not only to save time from going through the complex configuration steps of installing and running a DNS software but also because it is much more reliable.

Without a doubt, the best free DNS service provider out there is Cloudflare for numerous reasons, aside from their reliable and fast DNS services, you can also benefit from the performance and security features that come free with it.

There's a tutorial on YouTube explaining the whole process of pointing a domain to a VPS:

Or you can carry on with the article here. First, begin by creating an account at Cloudflare and add your domain there. Visit this guide on Cloudflare website for detailed steps:

https://support.cloudflare.com/hc/en-us/articles/201720164-Creating-a-Cloudflare-account-and-adding-a-website

Once you complete the signup process and add your domain, you will be provided with a set of nameservers that should be used, in order to host the domain DNS on Cloudflare.

You should go to your domain name control panel to update the name servers. This will depend on your domain name provider. For example, if you registered your domain with us, visit this guide to learn how to update name servers for a domain:

https://dash.wevrlabs.net/knowledgebase/4789/How-to-Edit-Name-Servers-for-a-Domain.html

If your domain is registered with another provider, please reach out to your provider support for help updating name servers for the domain.


Once the domain is updated to use Cloudflare name servers, the next step is to add proper DNS records in order to point it to your VPS. Visit this guide on Cloudflare to learn more about how to add/edit DNS records:

https://support.cloudflare.com/hc/en-us/articles/360019093151

Generally, you would start with 2 records:

  1. a A type of record, which is used to send web traffic to the destination server. The value of the A record is always an IP address (your VPS IP in this case).
  2. a CNAME type of record for the "www" part of the domain, or you can use "@" to universally point all subdomains to the IP of the primary root domain. The value of the CNAME record will be your root domain.
DNS records example

Of course, pointing the domain is just part one of the process of linking a domain to your VPS. The next steps are to configure the web server software in the VPS, and to configure the virtual hosts for that domain. This will vary depending on the OS, and type of web server software (apache, nginx, etc) you are using. However, searching Google and dev sites like StackOverflow with keywords specific to your own use case will yield a lot of useful results.

Below is a guide (Steps 1 to 5) that explains how to configure the domain when using Apache as the web server:

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-18-04

 

Was this answer helpful? 0 Users Found This Useful (2 Votes)