Security and performance are very important for any website or application. If you are concerned about them, then at some point in time you might have heard of Cloudflare. CloudFlare is a leading security provider for web applications. It is also a DNS provider, and Cloudflare DNS is one of the fastest DNS on earth! Choosing Cloudflare for your website is one of the best decisions you can take to make your sites fast and secure!
We at FlexiCloud Hosting always suggest that you use CloudFlare services in one way or the other.
What is Cloudflare?
In simple words, Cloudflare is a DNS provider. If you want to use Cloudflare services, migrating your name servers to CloudFlare is vital.
Not only they provide one of the fastest DNS servers, but they are also providing a lot of various other services too! Which include a reverse proxy service, edge caching, Free SSL for life, Content Delivery Network, firewalls and many more.
Starting with CloudFlare
- Click on Add Site button on top right
- Enter the site name and hit enter
Once you add the site, Cloudflare will query your DNS settings and try to copy them across. It will normally copy all the DNS records including Address records, MX , TXT CNAME, etc. I have seen that it fails to copy the subdomain records if there are any.
So you need to make sure that the subdomain records are replicated too.
After that, it will ask you to change the name servers, which you have to do from the respective domain registrar as well.
Once the name server is changed, it will take a few hours for the site to get activated. Once done you need to enable the Cloudflare icon in the DNS area so that the DNS requests will go through the Cloudflare algorithm.
Enable Free SSL
To enable free SSL from Cloudflare, you first need to enable Cloudflare from the DNS area and then Navigate to the Crypto tab.
If you do not have an edge SSL ( SSL installed in your web server ) , you need to go with the Flexible ssl. If you have a premium SSL installed in your web server ( Enterprise validation), you need to enable the Full SSL.
You can also enable ” Always Use HTTPS” so that the http requests to your site will get redirected automatically to https.
Caching and Minifying with Cloudflare
Go to the Speed tab and you can do auto minify and JS, CSS and HTML. Apart from that, you can have brotili compression, railgun and rocket loader. You can enable them as per your requirement and the plan with CloudFlare that you’re in.
Caching is the Tab where you need to navigate to clear the cloudflare caches. It is necessary some times when cloudflare wont detect the new content ot the change that you have implemented in your app.
Page rules are the most underrated feature of Cloudflare. You can override the default cache settings etc using page rules. You can create a page rule and make sure that the caching and other settings are enabled.
For a WordPress site, this page rule would make wonders.
Do not cache the WordPress admin area.
Cloudflare is a great tool to reduse the load that a site put towards the sever by offloading the content delivery to its edge servers. It also need that the dynamic content will still be loading from the origin server.
We will discuss more on how to use Cloudflare as a conventional content delivery network, and on how to fix common cloudfalre errors in coming posts.