Support » Fixing WordPress » Restrict access to my website depending on the location.

  • Hello WordPress community,
    I have a question on a very specific topic.
    I would like to restrict access to my website depending on the location.
    My website should only be accessible if the visitors are within 50m of a location.
    Unfortunately I have not found a plug-in that offers this function … Unfortunately, I am not a very talented programmer … Can you help me to implement this function? I would really be very, very grateful to you!

    The only solution that has occurred to me so far is that I set up a local server and this is only available from my WLAN, but I would like to achieve this effect without installing new hardware.

    Do you understand my problem? Can you recommend a suitable plug-in to me? Or is there a code that I can integrate into my website to solve the problem?

    • This topic was modified 2 years, 6 months ago by Jan Dembowski.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Unless you first setup a location identification method that checks user location every time they visit your site, this will not be possible.

    You assume that your users have automatically location verification enabled on their computer. Some do , some don’t. So ….

    You will have to ask them where they are located, then use an algorithm to calculate the distance from your location to their location. If it is more then 50Mls, deny entry.

    Check google distance algorithms that could be incorporated for that purpose.

    Good luck


    Thread Starter oaagency


    Hello Lode, thank you for your answer and your help.
    I am really happy that I am being helped here in the forum.
    The website will be accessed primarily via cell phones.
    Can’t the location of the cell phones be recorded automatically? Contact forms always transmit the location, isn’t that possible when opening a website?
    That with the Google algorithm is a good idea.
    Thanks a lot!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Restrict access to my website depending on the location.’ is closed to new replies.