Setting up a CloudFlare account very likely will improve your site’s speed all over the world, make your site more secure, and has many other great benefits. And you can do all of this with a free CloudFlare account. This article will discuss step-by-step how to set up a CloudFlare account to get your website on the CloudFlare CDN.
Step 0: Do website speed tests and backup website before setting up CloudFlare
Step0A: Speed tests
Before doing anything, I recommend you do 2 things. First, check your website’s speed before transferring over to CloudFlare. Later you will do speed tests again after CloudFlare really is done.
There are many sites that do website speed tests and analysis, but two sites that I use all the time and recommend are:
Step0B: Backup your data
Backing up your data isn’t really necessary because transferring over to CloudFlare this won’t actually be touching your data. But, I think it would be a good idea to back up your website data and database files just in case something goes wrong. At least it could give you peace of mind. And in any case, it’s always good to do more website backups. But if want, you could just not back up your data.
Step 1: First Go To Cloudflare.com and Start the sign up process
Now go to cloudflare.com. You should have 2 options for signing up. You could click on a button with the text “sign up” on the upper right hand side of the website, or you could fill out near the bottom of the page, but both will redirect you to the same page which is here.
Pick one of your emails to use, and then pick a password that you will use with that account to access CloudFlare. Simple enough. Within a few seconds, you should receive an email with a title like “Welcome to Cloudflare! You’re ready to add a website”.
Step 2: Add Your Website To CloudFlare
This is the actual step where you type in your domain name. If you owned example.com, you input example.com into box. Then click on the green button which says “Scan DNS records”.
Now you just need to wait for the scanning to finish.
When done, you can choose to watch the video CloudFlare shows you on how the basics of CloudFlare works, or you could just choose to ignore it and continue on by clicking on the green button that says “continue”. Either way, make sure you click on “continue” when ready.
Step 3: Verify DNS records and then make sure to have CloudFlare protect your “A” and “NS” records.
First, make sure that your DNS records that CloudFlare shows are correct. If they are not, adjust accordingly. If you need to add DNS records, you can do that with the “Add Record” button after choosing the type of record, the name, and its IP address. But again, most likely you won’t have to do this.
Initially, you may get a screen like the following image:
Next, you should choose to have CloudFlare protect your “A” records.
Cloudflare will show grey clouds for records that are unprotected by CloudFlare. The records that CloudFlare already protects, will be in orange.
Once you left click on a grey cloud, it should change to orange color which means that CloudFlare will protect that record.
One of the main reasons we want CloudFlare to protect the A records is so that you will get much less spam traffic and people trying to hack into your site via the IP address. This should put much less load on your server and also probably make your site faster. Next, click on the “Continue” button.
Step 4: Choose A CloudFlare Plan
CloudFlare has 4 website plans: Free, Pro, and Business. We will choose the Free plan, but you can always decide later to upgrade to a better plan.
Choose the Free plan and click on “Continue”.
Step 5: Change Your NameServers
You should get a screen that looks something like the following:
CloudFlare will tell you which NameServers to point to under the column “Change Nameservers to”. You may also be told to delete a NameServer Record. Make sure you note those down, because you will need to change your NameServer records to those from your domain registrar. For example, CloudFlare may tell you to change your NameServers to abc.ns.cloudflare.com and xyz.ns.cloudflare.com. It is very important that you change the NameServers only to the ones that CloudFlare tells you. Click on “Continue”.
Because the NameServers likely haven’t transferred over to Cloudflare yet, should get a message that says:
“Status: Website not active (DNS modification pending)”
A NameServer is what translates a domain which is human readable
like example.com, and translates that into an IP address for computers.
I use namecheap.com as the domain registrar for some of my websites. I will describe to you how I updated my nameservers with NameCheap.
To do this for NameCheap, after logging in,
1. I found my domain and clicked on “manage”
2. Then under the “Domain” tab, I found the section called “NAMESERVERS”
3. Then, I chose “Custom DNS” and the finally typed in the 2 nameservers that CloudFlare told me to enter.
If you use a different domain name registrar, such as GoDaddy.com, you will need to follow instructions on their site on how to change your name servers or may need to contact their customer service on how to do this.
After you have updated your NameServers to what CloudFlare has told you, it may take up to 48 hours for the DNS propagation to update around the world. But, in my experience, it should be ready in 12 hours or less.
Actually, for this article, the CloudFlare DNS records were updated within 10 minutes or so, but around the world, it may take longer.
Make sure you clicked on “Continue” in the screen where CloudFlare told you to change the Name Servers.
Step 6: Final Steps
After the Nameservers changes are complete, CloudFlare will send you an email with text containing something like “Congratulations! You have successfully added the website example.com to Cloudflare”. Once you have received that email, your initial Cloudflare setup is complete. Now you can configure CloudFlare for optimizations on your site if you would like, and we will write about how to do that in a later article. A finished initial setup should look something like the following:
What did you think of this article? Did you enjoy it? Let’s discuss this in the comments below.