Sometimes, our bot: AhrefsBot might be blocked by the Cloudflare Firewall preventing it from crawling the website.
If you want to lift this restriction, follow the steps below.
Whitelist using a custom rule
Log in to Cloudflare and select the domain.
Go to Security > Security rules.
Click Create rule, then choose Custom rules.
Give the rule a name, for example “Ahrefs IPs.”
Under When incoming requests match... section, set Field to “IP Source Address,” Operator to “is in,”:
Refer to the list of ranges from https://help.ahrefs.com/en/articles/78658-what-is-the-list-of-your-ip-ranges "Our crawlers use the following ranges:" section
Return to Cloudflare page and press Edit expression on the right side of Expression preview
Paste the list of ranges between curled brackets
{}Copy the list of individual IP addresses from https://help.ahrefs.com/en/articles/78658-what-is-the-list-of-your-ip-ranges "And the following individual IP addresses outside these ranges:"
Go back to Cloudflare page, put cursor after
202.8.40.0/22and before}), press Space barPaste the list of individual addresses from clipboard
Press Use expression builder to see the list of networks and IP addresses in a nicer view.
Under Then take action section, set the action to “Skip.”
Under WAF components to skip section, enable: "All remaining custom rules, All rate limiting rules, All managed rules, and All Super Bot Fight Mode rules".
Optionally keep “Log matching requests” enabled.
Set placement order as needed and deploy the rule.
You can refer to this image to confirm the rule's setup:
This should work for most websites with a generic setup. If it does not work for you, please contact Cloudflare Support.
If you have Cloudflare with Bot management
In the When incoming requests match... section:
select Field = "Bot detection", Operator = "is in", Value =
(any(cf.bot_management.detection_ids[*] in {121451232 133933265}) and cf.bot_management.verified_bot)Add Field = "Verified Bot", and toggle it on.
In the Then take action section:
Select Choose action = "Skip"
Under Then take action section, set the action to “Skip.”
Under WAF components to skip section, enable: "All remaining custom rules, All rate limiting rules, All managed rules, and All Super Bot Fight Mode rules".
Optionally keep “Log matching requests” enabled.
Set placement order as needed and deploy the rule.


