Cloudflare is a company that provides a reliable Content Delivery Network (CDN) and strong web security using DDoS mitigation. CDN is a globally distributed set of servers that work together to provide fast delivery of digital content.
Cloudflare acts as the reverse proxy for websites between visitors and hosting providers. CDN stores a cache file and serves it to the user as soon as possible. If the distance between the user and hosting server location is high, the nearest CDN can load that file from the cache data.
Benefits of using Cloudflare:
- Require less time to load a website
- Reduce the usage of excessive bandwidth
- Improves content availability and redundancy
- Increases website security
You must have a website to connect it to Cloudflare. If you don’t, then don’t worry. You can easily make one by reading our article about how to create a website without coding.
Steps required to set up Cloudflare:
First, go to the Cloudflare dashboard. Do sign up if you’re new or proceed to log in by entering your email and password.
After logging in, another page will open. Here You have to click on the +add site option to add your site.
After clicking, a blank form will appear. Enter your website there and select the add site button.
Now, a new page will appear. It’ll show some plans with features and their respective prices. You can choose any one of those. But we can proceed with the free option. So, scroll down the page and select the free (0$) option. Now select the continue button.
It’ll now import the DNS records of your website. Just go through it and check if those are correct? If everything is ok, then proceed to the continue button.
Let’s move to the next step. Here, you’ll get the nameservers from Cloudflare.
Go to your domain registrar. There you’ll find the default name servers under the DNS management section. Here, all you have to do is to change those nameservers and replace them with the Cloudflare nameservers.
Now go to your Cloudflare dashboard and check if they are set or not. [Note: The nameservers changing process may take up to 24-48 hrs.]
Basic Optimization:
After proceeding further, you’ll get the optimization panel. If you’re not using any kind of caching plugin, then enable all the options such as automatic minification of CSS, JS & HTML and the brotli compression. For other users, the auto minify option is not required as you can do the same by using a cache plugin. Don’t use the minify option from both Cloudflare and the cache plugin.
Note: Auto Minify is a process that can remove unnecessary characters from HTML, JavaScript, and CSS files. The minification of HTML files is done dynamically by removing comments and unnecessary empty lines. File caching is not necessary. CSS & JS minification operates on cached CSS / JS files only. Sometimes wrong cache options can break your pages. So check while you are tweaking the cache settings and don’t use the minify option from both Cloudflare and the cache plugin.
SSL/TLS Setup:
Cloudflare provides the Secured Sockets Layer (SSL) certificate for free. An SSL certificate makes your website secure. To enable it, go to the overview section under the SSL/TLS option and select the flexible option. Now your SSL certificate is on. After some time, your website will load over HTTPS protocol.