Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library


Category: >> .HTACCESS Codes Library >> Block Unwanted Referring Domain Traffic

Code Snippet </> Info

Snippet Name: Block Unwanted Referring Domain Traffic

Description: Block unwanted visitors based on the referring domain. You can also save bandwidth by blocking specific file types such as .jpg, .zip, .mp3, and .mpg from specific referring domains.

Note: Simply replace and with the offending domains of your choice. Add a RewriteCond for each offending domain added.


Last Modified: 2015-03-26 23:33:49

Language: .htaccess

Highlight Mode: html

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor

  About Copying
Copied To Clipboard!

# Block visitors referred from indicated domains <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_REFERER} scumbag\.com [NC,OR] RewriteCond %{HTTP_REFERER} wormhole\.com [NC,OR] RewriteRule .* - [F] </ifModule>

[ Snippet Options ]


© 2002 -  Snap Builder Public Codes Library