Skip to content

Instantly share code, notes, and snippets.

@dgmike
Forked from basbl/.htaccess
Created September 26, 2012 02:22
Show Gist options
  • Save dgmike/3785631 to your computer and use it in GitHub Desktop.
Save dgmike/3785631 to your computer and use it in GitHub Desktop.
a .htaccess with .htpasswd settings that whitelists facebook linter ip adresses
AuthName "Realm"
AuthUserFile /path/to/.htpasswd
AuthType Basic
Satisfy Any
<Limit GET POST>
Order Deny,Allow
Deny from all
#https://developers.facebook.com/docs/ApplicationSecurity/#facebook_scraper
Allow from 31.13.24.0/21
Allow from 31.13.64.0/18
Allow from 66.220.144.0/20
Allow from 69.63.176.0/20
Allow from 69.171.224.0/19
Allow from 74.119.76.0/22
Allow from 103.4.96.0/22
Allow from 173.252.64.0/18
Allow from 204.15.20.0/22
Require valid-user
</Limit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment