1
6 Comments

Restrict Country for accessing website

Question- I just launched a website landing page in preparation for launch in Los Angeles. I am getting close to 70% LA traffic (pun intended) but almost 20% from India and Iran. This product is specific to LA. Can I restrict these countries from accessing my website? Thanks!!

  1. 1

    You can, but are you sure you need to? Some of those people in Iran and especially India may be traveling to LA at times, plan to or have family/friends there.

    What do you gain from blocking people?

    1. 1

      This is true but I’m concerned they are bots. I literally just went live

      1. 1

        Even now, about 30% of my traffic is bots. They've scaled with my legitimate traffic and I basically just filter them out of my stats and ignore them.

  2. 1

    we have similar problem blocking IPV6 addresses

  3. 1

    Sure can! Implementation depends on your tech stack but in general you need what ever is serving your site check against the requesting IP address and respond appropriately. I implemented this once for a site that was being served by nginx. I can't remember exactly the implementation I followed but I did a quick Google search to find some that looks familiar https://www.howtoforge.com/nginx-how-to-block-visitors-by-country-with-the-geoip-module-debian-ubuntu

    How are you serving your site?

    1. 1

      It’s through GoDaddy

  4. 1

    This comment was deleted 7 years ago