How to block access by referrer using .htaccess?

You can use the .htaccess file to easily block visitors, which come from a specific website.

First, set the folder in which the .htaccess file will be created, using the .htaccess location form at the top of the page. A click in the form field will open a pop-up window, from where you can browse to the desired website folder.

Then, go to the mod_rewrite menu. In there, mark the Enable Block sites by referrer checkbox. In the form field, you can then enter the websites, from which you do not wish to accept visitors. You can enter multiple websites, separating them with commas.

Once you are done, scroll down to the bottom of the page and click the “Generate” button. The newly created .htaccess file will take effect in up to 15 minutes.