Are you a blogger or a website admin? Then this article is for you. After creating this blog, I realized that maintaining a website is not an easy job. There come days when a website goes down due to various reasons. There come issues by admin mistakes, problems caused by hosting provider, Website domain linking problems etc.
Now there come external things causing website downtime. It could be done by a person willing to make your site down for a while. DDoS attacks – Distributed Denial of Service is one of the popular methods used to make a website down. According to Wikipedia:
In computing, a denial-of-service (DoS) or distributed denial-of-service (DDoS) attack is an attempt to make a machine or network resource unavailable to its intended users.
DDos Attacks involve saturating the target machine with external communications requests, commonly know as packets. So much so that it cannot respond to legitimate traffic! This must be a painful thing for a website admin since meanwhile he/she is losing a good amount of visitors.
From my experience, one of my friend’s blog got attacked and it went down for a day. I recommended him to use CloudFlare CDN (Content Delivery Network) which I was already using from the beginning.
First of all you need to create an account for CloudFlare. If you ever surfed through this website before you may notice that the UI has been changed a lot, making it faster and minimal. Create an account and verify your Email ID.
- Next step will be to add your website URL. Enter the URL and they will scan your current DNS records which may take a bit.
- After completing the scanning process press Continue. Now comes the next step which is to Add DNS Records. There will be some records added by default, skip this step for now.
- Now it is time to select the CloudFlare plan. You may purchase a plan, but the Free plan is effective in my opinion. We are also using a Free plan for our blog.
- Now the next step is very important because, you will need to change your Webhost nameservers to CloudFlare nameservers. The CloudFlare works only after doing this step. You will need to access your domain registered Website for this.
- After logging into the domain registered Website, you will see an option called Nameservers. By accessing it, you will see the current Nameservers of your host provider. You need to delete it and fill it with CloudFlare Nameservers.
After updating the Nameservers, your CloudFlare account will be toggled on. There are some settings you need to set so that it works efficiently. Some months before, CloudFlare started giving SSL certificate to free users too.
The above picture shows the CloudFlare control panel section, where you will be needed to change some settings as I will be explaining now. Only some of them will be explained, other sections are optional.
Here you could see the graph of your visitors behaviour. It shows all the connection requests from the users including threats. Top visitor origins and Threat origins can be seen over here. Pages crawling status of search engines are also shown.
Managing your website security is done here. First of all set the Security Level. I recommend using Medium level since it is efficient. If you are getting threat visits again and again from the same IP, there is an option to block that IP address. To do so add new Access Rule and block the IP address. You may also whitelist an IP address.
To see the changes immediately, you need to purge the cache. And purging the cache may temporarily degrade your website performance. You may purge cache from Caching option.
In this section some useful apps to setup for your site. For example, there is Google Webmaster verification option, Pingdom website uptime monitoring, SmartErrors for a better 404 page, Swiftype search app etc. These apps are optional of course.
It was a quick tutorial on setting up CoudFlare for your website. If you have any comments and query please write at the comment section below 😉 Peace