How to Use CloudFlare CDN in Your Website
Content Distribution Networks
A CDN (Content Distribution Network) is a type of service which acts as an intermediate between the web server in which your website is hosted, and the final user who surfs your website. CDN servers are usually placed all around the world, and they provide caching features for static content of your website: this results in increased speed of your website, since all your static content is distributed by the CDN servers nearest to the user who is surfing your website. In addition, if your web server goes down for any reason, the CDN caching feature will be able to provide your users with a cached copy of your website, so that your users can still see static pages while your web server is down. In this article you will discover how to use CloudFlare, one of the most famous CDNs.
How to Use CloudFlare: a CDN and Much More
CloudFlare is just one of the most popular Content Delivery Networks, but it is not only a CDN. It offers various sets of services that will help you to get the most from your website, speed it up and also make it more secure. CloudFlare is free to use, however it also offers some paid plans (starting from around $10/month) which will offer you also more options. However the free plan just offers you a big amount of the CloudFlare features.
Where do you prefer to host your DNS records?
Host Your DNS Records With CloudFlare
The first service offered by CloudFlare is DNS Hosting: to use CloudFlare services, you need to rely on their DNS server, but you can also enable the only DNS hosting without using any other service. By doing this you are using CloudFlare as your DNS provider without enabling other services, even if I strongly reccomend to try all the powerful features of CloudFlare! Hosting DNS on CloudFlare is a very good idea since, in case you want to transfer your domain to another registrar, you are able to just set nameservers without reuploading all your DNS records from a registrar to another one. Your records just stay in your CloudFlare account, while you need to set only the CloudFlare nameservers. In addition DNS service provided by CloudFlare is very fast!
Filter Traffic by Using CloudFlare Firewall and Set Page Rules
CloudFlare also offers you a flexible firewall that will help you to set access rules to your website, filter IP addresses (so for example you can ban spammer IP addresses from accessing your website) and also set appropriate rules to prevent DDOS attacks. In addition, if CloudFlare detects a suspicious behaviour, it will prompt the user with a CAPTCHA verification code, or block his visits according to the rules you have set. You can also customize the prompt/block pages provided by CloudFlare, but only with a paid plan. If you upgrade to the business plan, you will also get advanced DDOS protection so that you can ensure your website will never go down after an attack.
You can also set forwarding rules and general page rules in order to match URLs to other URLs (in the free edition you can set a maximum of 3 forwarding rules). This feature is very useful if you need to set redirects from deleted content to updated versions of this content (and whose addresses are different, from example when you completely renew a website), or also if do you want to use a very simple tool to redirect "www" to the domain itself or vice versa.
Free SSL Encryption for Websites
You probably didn't believe that, but yes, with CloudFlare you automatically get HTTPS extension with a valid SSL certificate for free! However encryption is guaranteed only between CloudFlare servers and website visitors: if you want also to encrypt data transferred between your server and CloudFlare servers, you will need also to buy your own certificate as usual. However if you just want to provide basic encryption with the SSL icon and HTTPS protocol, you can get all of this for free by using CloudFlare!
CloudFlare also allows you to collect stats about traffic you receive on your website, so that you can just rely on this service, or you can also use Google Analytics in association. The stats include visits received to your website, details about these visits, and information about how much traffic have you saved by using CloudFlare service.
Protect Your Website and Supercharge It With Apps
CloudFlare finally protects your website by offering you some options like email obfuscation (so that spam bots cannot read email addresses, in addition they may be also filtered by firewall) and hotlink protection (so that other people cannot hotlink images and steal bandwith). In addition to that CloudFlare enables you to easily integrate some popular apps into your website in a click, and also subscribe to paid apps from within CloudFlare billing system. Example of apps are live chat widgets, Iubenda (an Italian startup that allows you to generate privacy policies for your websites), Google Analytics, security scanners and other various types of apps. Everything, without the need to write a single line of code or to implement scripts into your web pages, since you automatically implement services with a click through CloudFlare.
Test Your Knowledgeview quiz statistics
© 2015 Alessio Ganci