How To Block Referrals to My Website Through .htaccess?

Author Topic: How To Block Referrals to My Website Through .htaccess?  (Read 59850 times)

Offline newnerdTopic starter

  • Trade Count: (0)
  • Newbie
  • *
  • Thank You 0
  • Posts: 2
  • Karma: 0
I want to block referrals from a website and it's country level domains from visiting my website. - How can I do that from .htaccess?

for e.g: I wanna stop example.ru , example.dk, example.bd, example.in, example.nu and all example.** ...... to stop sending referrers to my website.


Offline susanburling

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 5
  • Posts: 108
  • Karma: 1
  • Gender: Female
    • Best PHP Development Company
Re: How To Block Referrals to My Website Through .htaccess?
« Reply #1 on: 12-03-2018, 00:05:31 »
You can block Visitors to your website by Country Using Firewall
This link might be helpful https://www.ip2location.com/blockvisitorsbycountry.aspx


Offline John - Smith

  • Trade Count: (0)
  • Sr. Member
  • ****
  • Thank You 15
  • Posts: 340
  • Karma: 6
  • Gender: Male
    • online-paystubs
Re: How To Block Referrals to My Website Through .htaccess?
« Reply #2 on: 12-13-2018, 22:17:04 »
hey op

country firewall[link shared by susanburling] works for you? let us know  :)

Offline billyjhon

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 0
  • Posts: 83
  • Karma: 0
Re: How To Block Referrals to My Website Through .htaccess?
« Reply #3 on: 07-15-2019, 04:30:41 »
Be exceptionally cautious contributing directions in the .htaccess record. ...

Login to your Google Analytics account.

Snap Admin.

Snap All Filters.

Give the channel a name.

Select Predefined.

Select 'Bar', 'traffic from IP locations' and 'that are equivalent to' in the cases underneath.

Offline Neel Patel

  • Trade Count: (0)
  • Sr. Member
  • ****
  • Thank You 21
  • Posts: 372
  • Karma: 14
  • Gender: Male
  • SEO Expert in Surat, IN
    • Autofresh
Re: How To Block Referrals to My Website Through .htaccess?
« Reply #4 on: 07-18-2019, 22:48:11 »
Instead of asking an SEO person, ask this to a developer!
they can help you as they are good at reg exp. and these htacess files and all!


Offline Lishmalinyjames

  • Trade Count: (0)
  • Hero Member
  • *****
  • Thank You 3
  • Posts: 797
  • Karma: 0
    • Oneplus Service Center in Chennai
Re: How To Block Referrals to My Website Through .htaccess?
« Reply #5 on: 08-18-2021, 03:38:39 »
The most effective way to block your spam referral traffic is through a . htaccess (hypertext access) file. This configuration file is used to control your server. It can be instructed to block spammy visits by domain or IP address.

Offline makoo

  • Trade Count: (0)
  • Full Member
  • ***
  • Thank You 5
  • Posts: 216
  • Karma: 0
Re: How To Block Referrals to My Website Through .htaccess?
« Reply #6 on: 03-04-2022, 06:15:51 »
There are many referrer spam websites that will send you a fake hit to your website. You may not be able to control or stop these hits. However, there is a way to filter these web referrals by creating RewriteRules for each one of them in your .htaccess file.
The .htaccess file is a configuration file for Apache web servers that works on a directory basis. When you grant permission for another website to access your files, you may sometimes get more than you bargained for. hаckers can exploit vulnerabilities in the server and the application software running on it. And even if hаckers don’t find a way in, another website may share your bandwidth or send spam to your users on your behalf. Here are some ways to use .htaccess to block referrals from other websites.

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
1782 Views
Last post 09-10-2011, 10:24:40
by Maddy
2 Replies
2987 Views
Last post 12-04-2014, 02:47:16
by Stephen
0 Replies
1436 Views
Last post 04-27-2015, 17:09:57
by nqservices
4 Replies
3596 Views
Last post 06-09-2021, 22:34:13
by Yuga
3 Replies
2738 Views
Last post 02-07-2017, 00:31:34
by gurujeet