How To Move Domain to Cloudflare and Point to VPS

Moving Your Domain To Cloudflare and pointing it to your VPS

First, go to https://cloudflare.com and register a free account. If you already have one, just login and click the "Add Site" button.


cloudflare add a site


Enter your site domain name that you purchased. In my case I purchased techstatlab.net from Godaddy.com


cloudflare add a site 2


Select the free plan and continue. Feel free to sign up for the Pro plan for the Web Application Firewall. It's not necessary but a great security enhancement for your site.


cloudflare free plan


Once you've added your domain name in and select the free plan, Cloudflare will scan the DNS records.


cloudflare scanning for existing dns records


At this point Cloudflare will ask you to change your nameserver records found at your domain registrar, again, mine was Godaddy. Thus I need to go to Godaddy and change the records as stated.


cloudflare new domain


Open a new tab and log into your domain registrar, like I did with Godaddy.


godaddy login


Go to "All Products and Services" and edit the "DNS" for your domain. If you have a different registrar then you'll have to consult their documentation on how to edit nameserver records for your domain.

godaddy nameserver change


Change your Nameservers to what Cloudflare asked for. In my case it was: "coco.ns.cloudflare.com" and "woz.ns.cloudflare.com".


godaddy cloudflare nameserver


Once the nameserver records are changed go back to the Cloudflare tab and click "Done, check nameservers"

cloudflare check nameservers

If your nameserver changes were successful, and they have been pushed out by your Registrar (it can take time) then you should see this confirmation.

cloudflare complete check nameservers

At this point you should be able to go into the DNS settings for your domain.

cloudflare edit dns button

If this is a brand new domain you just imported, and it's never been used then you can pretty much delete every record you see and create an "A" record, and cname for "www"; which I will show how to do.

If this domain was previously in use, AND you have mail hosted somewhere like GMAIL for your domain then you must make sure not to delete the following records: A records that reference "mail", MX records, TXT records with the following words: SPF, DKIM,DMARC. This way your mail can continue working.

In my case this was a brand new domain so I am deleting every single record and creating two new ones.

cloudflare delete record


Then I will create 2 records, one for techstatlab.net and one for www.techstatlab.net. Make sure that "YOURVPSIP" is actually the IP address for your VPS.


cloudflare a record @


cloudflare cname record


At this point we have 2 records, A and CNAME. A points to your VPS IP, cname points to your domain. I should now be able to go to techstatlab.net or www.techstatlab.net. That's it, you're complete and moved over.

Please note this is just a test domain so this page will actually not display a website.


You should also take advantage of Cloudflare's free SSL/TLS termination to get you a free SSL certificate.Click Here