A Complete Guide to Whitelisting in Cloudflare

A Complete Guide to Whitelisting in Cloudflare

Cloudflare as firewalls in place that block malicious IP addresses from accessing your website or server. But they do target good and trusted IP addresses too. To prevent this from happening, you need to whitelist those IP addresses.

In this article, learn all you need to know about Whitelisting in Cloudflare. And follow the process to whitelist those IP addresses.

How to Whitelist IP Addresses in Cloudflare?

If you want to whitelist IP addresses, here are the steps you need to follow:
  • Open cPanel File Manager or SSH Command Prompt
  • Open the .htaccess file at /home/username/public_html/.htaccess. If the file doesn’t exist, you need to create one.
  • Next, copy and paste the following code inside the file:
Code:
order deny,allow
deny from all
  • Then open this link in a new tab
  • Copy all the IP addresses and paste them in the .htaccess file after the deny from all line. Make sure each address is on a separate line
  • You need to add ‘allow from’ in front of all the IP address
  • If you’ve got other IP addresses to whitelist, then add then too
That’s it. Now Cloudflare will not block the IP addresses you’ve mentioned in the file.

Whitelist IP addresses from Cloudflare account

You can also whitelist IP addresses from within your Cloudflare account. Here are the steps involved:
  • Log in to your Cloudflare account
  • Click on Firewall icon
  • Open Tools tab
  • Locate the IP Access Rules. Below it, you need to add the IP addresses that you want to whitelist
  • You’d have to do three things:
  • Enter IP address
  • Select Whitelist
  • Enter the website for which the IP address need to be whistelisted
  • Repeat for other IP addresses
  • Finally, click on Add
That’s how whitelisting works in Cloudflare. For more assistance, contact the support team.
Author
kumkumsharma
Views
5,292
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top