.htaccess config to allow Cloudflare IP ranges

There is a listing of CF IP ranges that I would like to include in my server .htaccess file: https://www.cloudflare.com/ips/

I do not know the syntax that is needed to insert these into .htaccess, and what I have found on the web is confusing to me.

For example, I do not wish to deny any IP; rather, I wish merely to indicate that I want to allow the ranges in the list above.

I’d be grateful if someone could please tell me how to indicate this in .htaccess.

Thank you.

Here’s an example I found online, but make sure the IPs are correct (they might be outdated):

Thanks, I saw that too… unfortunately its ambiguous and not properly formatted. What I need is more along the lines of

order allow,deny
allow from xxx.xxx.xxx.xxx
allow from xxx.xxx.xxx.xxx

I will give it a try and see what happens. :slight_smile:

This topic was automatically closed after 31 days. New replies are no longer allowed.