Skip to main content

Access denied used cloudflare to restrict access

some times when you want to share a link on facebook and your website is protected by Cloudflare you will have this error 

"access denied used cloudflare to restrict access"

to solve it you have to "Whitelist Facebook ASN IP in Cloudflare"

So now how you will Whitelist Facebook ASN IP in Cloudflare, to do it follow the below steps 

you can whitelist Facebook’s entire IP range in Cloudflare’s Firewall settings.

 

Cloudflare has assured me that this will not punch a hole in your security. You’re welcome to take their word for it, if you like.

Because the Facebook IP range is so vast, they provide an ASN (Autonomous system) to provide that range.

In other words, this ASN takes the place of perhaps 100s of IPs, making it easier to deal with.

There are two ASNs for Facebook:

  • AS32934
  • AS63293

 

To whitelist them with Cloudflare:

  • Go to Firewall > Tools
  • Enter the ASN in the IP field
  • Select Whitelist/Allow from the drop-down
  • Add a note that this is Facebook
  • Click the Add button
  • Repeat for the second ASN

 

Use Facebook Debugger to Re-Scrape
If you had previously shared a URL on Facebook and it gave you an error, or was missing an image, you will want to run that URL through the Facebook debugger app to have it rescanned.