Cloudflare is optional. The free plan puts a CDN and some protection in front of your site. It is a good choice if your visitors are spread across several countries.
Set it up
- Create a free Cloudflare account and add your domain. Cloudflare imports your records. Compare them with the Zone Editor in cPanel and fix any that are missing (Managing DNS records).
- Make sure an
Arecord for the domain and forwwwpoints to your hosting's IP address (Pointing your domain to DGT Host). - At your registrar, change the nameservers to the two Cloudflare gives you. From then on, DNS is managed in Cloudflare, not in cPanel.
- Under SSL/TLS, set the mode to Full (strict) once your site has a valid certificate (Installing an SSL certificate).
- Turn on Always Use HTTPS.
Email records
Put the mail record and any smtp or imap hostnames on DNS only (grey cloud), or email breaks. See Email not arriving when using Cloudflare.
What it does and does not do
- It caches images, CSS and JS. It does not cache normal HTML pages unless you add a rule for it, and for WordPress the LiteSpeed plugin (Setting up LiteSpeed Cache for WordPress) already does that job on the server.
- It can block attacks and bad bots, and country rules can be added in its Security section (Blocking IP addresses and stopping hotlinking).
- Free plans limit uploads through the proxy to 100 MB.
If it doesn't work
- "Too many redirects": switch SSL mode from Flexible to Full (strict).
- Error 521 or 522: Cloudflare cannot reach the server. Check that the record points to the right IP, and open a ticket (Opening a support ticket that gets answered quickly) if it does.
- Changes to your site do not show: purge the cache in Cloudflare under Caching.
- Rocket Loader and other speed toggles can break scripts. Turn them off if something stops working.