Keep Facebookbot away from forum via .htaccess

I'm not certain what the most recent user-agent is for Facebook but this is the last one I know of...

Option 1 using robots.txt - this should work:

Code:
User-agent: facebookexternalhit/1.1
Disallow: /

Option 2 using htaccess - this should work:

Code:
#   Block Facebook bot
RewriteCond %{HTTP_USER_AGENT} ^facebookexternalhit/1\.1  [NC]
RewriteRule ^ - [F,L]
 
Top Bottom