Block visitors by referrer – .htaccess

Add the below given code in your .htaccess file

RewriteEngine on
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} referer_domain.com [NC]
RewriteRule .* – [F]

Note : Make sure that you have enabled the module “mod_rewrite” in your server

Leave a Reply

Your email address will not be published. Required fields are marked *