Skip to content


Signing up for Cloudflare

First you'll need to have access to an account created at

When you log into the account you should be greeted with a box that requests a name to be entered into the "Enter comma-separated domain names" box.

Enter a relevant name here and click on "Begin Scan"

Once this is done, you will need to compare the scanned records with the records that the current DNS server has.

This means that you will need access to the current DNS provider.


If the client is unsure who this is, you can run the following command, which should give you an idea

dig NS

Which should return something like this

; <<>> DiG 9.11.1-P3-RedHat-9.11.1-2.P3.fc26 <<>> NS
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9422
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

; EDNS: version: 0, flags:; udp: 512
;    IN  NS

;; ANSWER SECTION: 2688    IN  NS 2688    IN  NS 2688    IN  NS

;; Query time: 26 msec
;; WHEN: Wed Oct 18 14:18:57 BST 2017
;; MSG SIZE  rcvd: 116

In this case is being used as the nameserver, which is controlled by fasthosts.

Once you have visibility of the records with the current DNS provider, you need to go ahead with the comparison.

If you need to change anything to the Cloudflare records, simply click on what you need to edit.

If you need to add a record, then use the drop down box at the top of the records list to pick then type and then insert the relevant info.

Once you are happy then continue.

You should now see a selection of plans. Chances are you are going to want to go with the free plan. Continue on with whatever you need to choose.

You will now be presented with a list of nameservers. The left nameservers are the ones that are currently in use on the current dns provider. You need to access the current DNS provider and change these nameservers to the ones in the right column.

Once this is done hit continue.

That's it. You will now be on a page that lets you know the current status of the changes and to allow 24 hours for it.

Test if A Resource is Being Cached

You can use the following gist to test if a resource is being cached by Cloudflare:

Integration with Magento 2

Enabling Web Application Firewall

To enable Web Application Firewall

  • Login to your Cloudflare account
  • Click on your domain
  • Click on Firewall
  • Scroll down to see the "Web Application Firewall" tab and click "On"
  • Enable rule for Magento from "Package: Cloudflare Rule Set", and any other rules that seems to be reasonable.
  • Enable rules from "Package: OWASP ModSecurity Core Rule Set", the seems reasonable also.
  • Set OWASP sensitivity to "Low" as that is the recommendation from Cloudflare themselves

CloudFlare Page Rules Forwarding