How do I whitelist multiple IPs or IP ranges at once?

Hi! How do I whitelist multiple IPs or IP ranges at once?

I am trying to use an SEO tool called Ahrefs, which has a site audit option that scans each of your website’s pages to look for SEO errors. I was checking their documentation, and they warn that cloudflare can block their bot sometimes, and recommend whitelisting their IP ranges in cloudflare.

I would like to do it preemptively. However, I am following their guide for this and it doesn’t seem to work. Did you change the UI, or remove the ability to whitelist multiple IPs or IP ranges at once?

Here is the guide they have now: How to whitelist Ahrefs IPs in Cloudflare? | Help Center - Ahrefs

Can you give me an up to date guide, please?

If not by IP, you could try allowing user-agent which contains Ahrefs for example (not the best possible way, but I believe it could help too).

Furthermore, due the guide to the link from above, you could create a new Firewall Rule, select IP Source Address there for operator is in and put their IP addresses in the propriate input field, at the end select the action Allow and Save.

Expression:

  • (ip.src in {51.222.253.0/26 54.36.148.0/24 54.36.149.0/24 195.154.122.0/24 195.154.123.0/24 195.154.126.0/24 195.154.127.0/24})

Screenshot:

  • or else, you could add the IP addresses to the IP Access Rules (as it’s stated in the above link) with the action Allow
  • or even different possible way, to add them to your Custom list and therefore use it in the Firewall Rules

To create a Custom list, kindly navigate to https://dash.cloudflare.com/?to=/:account/configurations/lists.
To create a Firewall rule, kindly navigate to https://dash.cloudflare.com/?to=/:account/:zone/firewall/firewall-rules/new.

Helpful article about Good bots which Cloudflare detects (Ahrefs listed here) can be found at the below article:

An example of a Firewall rule for User-agent if it contains ahrefs then Allow, would go like:

  • (http.user_agent contains "ahrefs")

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.