How to add your website to Cloudflare

Cloudflare is an intelligent cloud network which protects your website from unwanted traffic such as crawlers and bots which may be using up your bandwidth but not doing you any good in terms of genuine traffic and leads. Not only that is also acts as a CDN and caches static resources on your website such as images, CSS and JavaScript thereby decreasing page load times and improving user experience in terms of fast page load.

I had heard about Cloudflare but did not know about its working till an incident happened to one of our client’s website hosted in the UK. The client’s website was well known globally due to it website name and it had a lot of traffic from around the world. Then one fine day he suffered a DDoS attack. It was such a fierce attack that our dedicated server was not able to serve any other websites and our hosting company was forced to take down the website from the hosting server. However when they tried taking it back online the DDoS attack restarted and it seemed like there was no respite. One of the support personnel at the company suggested we try Cloudflare as it was able to withstand the attack and had the capability to filter out unwanted traffic. We registered a free account with them and changed our nameservers. As soon as the nameservers clicked in we started to see that the website started to respond to requests even though it was still slow by any means. We talked to Cloudflare support and they said that they have started to cache the website and you will see improvement when much of the website has been cached by them.

We also blocked out traffic from countries in Africa, China and Russia as these were not the target countries of the client and we started to see improvement in speed. After talking with the client we blocked the website from all over the world except for the UK and we could see that there was remarkable improvement and in the next couple of days the website was working normally as Cloudflare had done its job and saved our client’s website from the DDoS attack.

After seeing this real life example in action I decided to move my website to Cloudflare. If you too want to move your website to Cloudflare then please follow the steps given below

1. Login into your account after creating your account on Cloudflare

Cloudflare login screen

2. After logging in you will come to your websites dashboard. If you have already moved some of your websites to Cloudflare then you will see a list of your domains on the screen. If you need to add a new website then type in the domain name and click Add Website button.

Cloudflare Websites Dashboard

3. Once you click on the button Cloudflare will start scanning your domain’s DNS records.

Cloudflare scanning your domain's DNS records

4. Once the scanning is complete the panel asks you to click on the button to go to the next page to see all the fetched records.

Cloudflare DNS scan complete

5. You will see all the DNS records such as A, CNAME, mail, ftp, www etc currently setup for your domain. It also shows you which parts will come through Cloudflare and which parts will be directly accessible through the internet. Most of the times Cloudflare gets it right and you can continue setup as normal. If you need to change anything you can do it later on as well once your domain has been setup on Cloudflare.

Cloudflare displays DNS records for your domain

6. The next screen asks you whether you will be going for a free plan or a paid one. It also asks you whether you would like a CDN in your package, security level for your website etc. As we are going for a free plan you can proceed with the default selection provided on the screen. You can come back to this screen later on if you change your mind regarding any selection.

Cloudflare domain settings

7. The last screen you will see asks you to change your nameservers to the one provided by Cloudflare. This is where you will need to login into your registrar account and change the nameservers for your domain. Once that’s done you can come back to this screen and click on the button to confirm that you have done as requested. It took 1 hour for my domain and it should be more or less the same for you.

Change your nameservers to point to the ones shown on Cloudflare

I hope the above helped you and if you would like to add anything then please do send me your feedback.

Leave a Comment