How to stop Facebook bot from crawling my site?

usong725

Regular Member
Joined
Nov 7, 2011
Messages
335
Reaction score
74
As the title says.

The facebook bot is crashing my shared hosting. It is just 10th of the month and my bandwidth allocation is already gone.

Need help badly. Searched the net and the forum but the results are either very old topics or dont work anymore.

Thanks in advance.
 
Try adding this to your .htaccess

Code:
RewriteCond %{HTTP_USER_AGENT} !facebookexternalhit/[0-9] 
RewriteRule .* - [R=403,L]
 
Let me try that.

Thanks TheeAriGrande.

edit: I removed the "!" to make it work. No more visit from facebook crawlers since adding it in my .htaccess file.
 
Last edited:
Try adding this to your .htaccess

Code:
RewriteCond %{HTTP_USER_AGENT} !facebookexternalhit/[0-9] 
RewriteRule .* - [R=403,L]

Sir can you or other explain to me? Does this work similar like cloaking?
 
do you have to apply it for new site and if, apply it on current site will you expect improvement of the reach in FB with this ?
 
Back
Top