1. This website uses cookies to improve service and provide a tailored user experience. By using this site, you agree to this use. See our Cookie Policy.
    Dismiss Notice
  2. The hosting section is sponsored by Hostwinds visit the BHW Partnership program for your exclusive BHW member hosting benefit today.
    MUST be signed into your BHW account.
    Dismiss Notice

Blocking Visitors

Discussion in 'Web Hosting' started by drin101, Oct 25, 2019.

Tags:
  1. drin101

    drin101 Junior Member

    Joined:
    Jan 30, 2017
    Messages:
    122
    Likes Received:
    19
    Gender:
    Male
    How can i block visitors from specific countries on a wordpress site ?
     
  2. thetraveller

    thetraveller Jr. VIP Jr. VIP

    Joined:
    Mar 9, 2009
    Messages:
    1,353
    Likes Received:
    786
    Gender:
    Male
    Occupation:
    Social Accounts, SEO, Articles
    Location:
    At the office
    Home Page:
    You could install and use a plugin like IP geo block. The other way is finding a free database of country IP subnets, and add a block filter in the .htaccess file in the root of your domain.
     
    • Thanks Thanks x 1
  3. h4tcargo

    h4tcargo Jr. VIP Jr. VIP

    Joined:
    Apr 30, 2019
    Messages:
    111
    Likes Received:
    20
    Gender:
    Male
    • Thanks Thanks x 1
  4. stromind

    stromind Jr. VIP Jr. VIP

    Joined:
    Oct 1, 2018
    Messages:
    336
    Likes Received:
    81
    Gender:
    Male
    Occupation:
    system administrator
    Location:
    localhost
    Home Page:
    you can use cloudflare and block countries to visit your site
     
    • Thanks Thanks x 1
  5. Flegy

    Flegy Newbie

    Joined:
    Dec 6, 2018
    Messages:
    34
    Likes Received:
    6
    Location:
    Croatia
    Home Page:
    You can simply go on https://www.countryipblocks.net/country_selection.php choose country what you want to block and paste it in your .htaccess file in your web folder, if dont have one create it.
     
    • Thanks Thanks x 2
  6. h4tcargo

    h4tcargo Jr. VIP Jr. VIP

    Joined:
    Apr 30, 2019
    Messages:
    111
    Likes Received:
    20
    Gender:
    Male
    • Thanks Thanks x 1