Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4337700
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:58:49+00:00 2026-05-21T10:58:49+00:00

Is is safe to create a .htaccess in a folder in my website (example.com/thisfolderismine)

  • 0

Is is safe to create a .htaccess in a folder in my website (example.com/thisfolderismine) and ONLY allow MY IP address?

My goal is to MAKE SURE that no one else than me access this folder. This is also a login in this folder but I’d rather take a crazy-full access protection.

Is this safe? Is there a way to hack this?

Note: I don’t care about not being able to access it from somewhere else.
My website is getting hacked by Ukraine, Vietnam, Philippines, Algeria, China in the last 4 months and these nolife are driving me nuts.

Also, is there a simple way to only allow IP/computers from ONLY Canada & USA? I don’t have clients anywhere else anyway.

Thanks a bunch

Joel

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T10:58:50+00:00Added an answer on May 21, 2026 at 10:58 am

    Kind of going in reverse order of your question:

    While there may be some general association of geographic location to IP address range, you should not count on it.

    What if one of your clients in Canada want to access your site through a proxy in Europe? You should use a “real” authentication method to verify users, not IP address.

    Using specific IPs is better, assuming those users have static IPs. This not a safe assumption for a dial-up or DSL-based user, though (for example).

    If you yourself have a static IP, then yes, it should be fine to limit access to a folder based on that. Of course if you ever release that IP or switch ISP, etc. you will have to update your website’s configuration. One more thing to have to remember.

    You could also consider using a VPN and only limiting your page’s access to the local network (see anubhava’s answer – note the 192.168.XX.XX address).

    Personally, I use a combination of HTTPS + username + good password for stuff like this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a safe sum extension method that would have the
I've got a number of users, each with the website page like http://www.mysite.com/folder/artist_id.php?id=33 The
If one needs to create an office website (that serves as a platform for
In Visual Source Safe 6.0, you could reset a working folder by setting it
Is it safe to assume that two itterations over the same collection will return
Is it safe to assume that all implementations of org.springframework.context.MessageSource interface are thread-safe after
Is it safe to assume that event subscribers are called in order of subscription?
Is it safe to assume that NULL always translates to false in C? void
Is it safe to create a back link with: $backLink = htmlentities($_SERVER['HTTP_REFERER']); or is
I need to know if it's safe to create a static Regex object like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.