1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to block a specific country in your website?

Discussion in 'Blogging' started by ryanhackmachine, Jan 8, 2011.

  1. ryanhackmachine

    ryanhackmachine Regular Member

    Joined:
    May 8, 2010
    Messages:
    380
    Likes Received:
    223
    Occupation:
    Spend Money
    Location:
    In front of my desktop pc
    is there a way to do this? basically i want to block philippines in my website
     
  2. Hunwarrior

    Hunwarrior Jr. VIP Jr. VIP Premium Member

    Joined:
    May 12, 2010
    Messages:
    1,027
    Likes Received:
    859
    i would put a geo redirection on index and redirect all traffic to site, and send phillipines to someone elses.
     
  3. ewper

    ewper Newbie

    Joined:
    Nov 19, 2008
    Messages:
    36
    Likes Received:
    8
    http://anonym.to/?http://www.blockacountry.com/
     
  4. ryanhackmachine

    ryanhackmachine Regular Member

    Joined:
    May 8, 2010
    Messages:
    380
    Likes Received:
    223
    Occupation:
    Spend Money
    Location:
    In front of my desktop pc
    can you guide me thru that? i dont know how
     
  5. likewhoa

    likewhoa Registered Member

    Joined:
    Nov 12, 2010
    Messages:
    62
    Likes Received:
    6
    Gender:
    Male
    Occupation:
    Entreprenuer
    Location:
    Brooklyn, NY
    Home Page:
    If you're using an httpd like apache that uses .htaccess you can then deny ip blocks.

    i.e Block everyone from ALAND ISLANDS (smallest block i could find)

    Code:
    [FONT=monospace]
    [/FONT]order allow,deny
    deny from 217.29.224.0/20
    allow from all
    
    Tip countryipblocks.net/country-blocks/select-formats/

    has country codes
     
  6. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Go to
    Code:
    http://www.blockacountry.com
    and select the country - it will then give you the lines to put into your htaccess file.

    The only thing you really need to change is the line:
    Code:
    ErrorDocument 403 http://www.proxynetwork.ws/blocked.html
    Change the URL to a page on your site which shows content you want to show to people who are coming from your blocked country. If you don't want to show a secific error, just delete that line.

    Hope that helps
    FB
     
    • Thanks Thanks x 1
  7. namestrands

    namestrands Newbie

    Joined:
    Sep 28, 2010
    Messages:
    21
    Likes Received:
    3
    are you on an apache server with php?
     
  8. faster

    faster Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 3, 2011
    Messages:
    1,730
    Likes Received:
    184
    Home Page:
    Yeah you can block ever gything on your site. Write the code which you want to block and put it your website designer software.