One of the most common benefits of Cloudflare is DNS proxying. But what does this even mean?
Let’s try to break it down into simple terms for beginners 🙂
Imagine you want to send a letter to a friend. Instead of using your regular postal service (your ISP’s DNS), you decide to use a faster and more secure courier service (Cloudflare DNS). This courier service not only delivers your letter but also checks it for anything suspicious before it reaches your friend (providing security features like DDoS protection and blocking malicious websites).
In this context, Cloudflare DNS proxying is like using a faster and more secure courier service that not only translates website names into IP addresses but also adds an extra layer of protection while doing so.
A proxy is like a middleman that stands between you and the destination you want to reach. In the case of Cloudflare DNS proxying, Cloudflare not only helps you find the IP address of the website you want to visit but also acts as a protective shield between you and that website.
RECOMMENDED READING: How can I fix Cloudron domain redirection issues?
Pointing a Domain to the VPS Server
When you register a domain name (like “www.ugacomp.com”), you need to specify where it should point on the internet. This is done by associating your domain name with the IP address of the server that hosts your website.
The IP address is provided by your hosting provider and can be associated with the server where your website is hosted. Basically, you’re telling your Domain registrar that when someone types in your domain name, it should translate that into the IP address of your hosting provider’s server.
Therefore, domain name pointing is the process of connecting your domain name to the server where your website is hosted, making it accessible to users when they type in your domain name in their web browsers.
RECOMMENDED READING: Beginners’ Guide to Owning a Professional Website
Pointing a Namecheap Domain to Contabo VPS servers
Before we add the Namecheap domain to Cloudflare for proxying, we need to first point it to Contabo where our VPS server is located. This will involve creating DNS records using Contabo’s DNS Management service and transferring Contabo Nameservers to Namecheap’s custom Nameserver configuration settings. See the image below:
This step-by-step guide will help to understand how to point your Namecheap domain to Contabo’s VPS IP address.
RECOMMENDED READING: How to Point a Domain Name from Namecheap to Contabo VPS
Add a Domain to Cloudflare
Now that your Namecheap domain has successfully been pointed to the Contabo VPS server, the next step is to add it to Cloudflare for proxying. Here is what you need to follow:
Create a Cloudflare account
Cloudflare allows you to register for an account on their platform for free and they don’t require you to add any payment information. Using Cloudflare’s DNS proxing service is free and they won’t charge you any money.
So, you need to create your Cloudflare account by following this link. The process of signing up with Cloudflare is easy and won’t give you any headache 🙂
Add a domain/ Site
Inside your Cloudflare Dashboard, you will see a blue add a site button. See the image below:
After clicking on the Add a Site button, you will need to type in the suitable domain you want to be proxied. In this article, I am using ugacomp.com as an example domain, but you can use your own domain. See the image below:
Select the Free Subscription Plan
Cloudflare offers a couple of subscription plans, but in this case, you will need to select the free plan with zero charges. See the image below:
Under the free Cloudflare plan, you will enjoy; DNS hosting and proxying, Global CDN, a free universal SSL certificate, and DDoS Protection.
RECOMMENDED READING: How to host a Laravel application on Ubuntu using Apache
Review your DNS records
At this point, Cloudflare will do a good job of scanning and importing the DNS records from Contabo where you first created them when setting up the Namecheap domain. In most cases, the major DNS records will be imported and you will not need to do anything under this stage. But if you think there are missing records, then you will need to add them manually. Just make sure you know what you’re doing 🙂
Here is the sample DNS zone in Cloudflare:
It’s important to note that some records indicated above are likely not to appear in your Cloudflare DNS zone so don’t freak out 🙂
Change to Cloudflare Nameservers
This is an important step you should take into consideration right after reviewing the DNS Records. All you have to do is click the Blue continue button below your DNS records in Cloudflare and proceed to the next page where you can find the Cloudflare Nameservers.
Under the Change your Nameservers page, you will need to scroll down a little to find the Cloudflare Nameservers we need to use. See the image below:
You will need to copy the provided Cloudflare Nameservers and add them to Namecheap Custom Nameserver settings.
RECOMMENDED READING: How to deploy WordPress on a Ubuntu LAMP Server
Changing from Contabo Nameservers to Cloudflare
When pointing a Domain Name from Namecheap to Contabo VPS, it requires us to add the Contabo Nameservers to Namecheap. But when we want to use Cloudflare in this setup, we will replace the Contabo nameservers with Cloudflare Nameservers in Namecheap. See the image below:
To learn how to add and use custom nameservers in Namecheap, follow this guide
RECOMMENDED READING: How to Point a Domain Name from Namecheap to Contabo VPS
Configure SSL Settings in Cloudflare
You can also configure Cloudflare’s Universal SSL certificate by clicking on the SSL/TLS settings section found on the Left pane as shown in the image below:
You need to configure the SSL/TLS encryption mode. You can choose between Flexible or Full mode settings. See the image below:
RECOMMENDED READING: How to Install WordPress on a VPS Server using Cloudron?