# Deny access file

**URL:** <https://answers.netlify.com/t/deny-access-file/83065>\
**Category:** Support\
**Tags:** redirects\
**Created:** [January 11, 2023, 10:16pm UTC](https://answers.netlify.com/t/deny-access-file/83065 "2023-01-11T22:16:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlacksARkwop](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/blacksarkwop/32/23695_2.png) [@BlacksARkwop](https://answers.netlify.com/u/BlacksARkwop)\
**Post date:** [January 11, 2023, 10:16pm UTC](https://answers.netlify.com/t/deny-access-file/83065/1 "2023-01-11T22:16:15Z")

</div>

I need help, I use netlify hosting for the sites but I would like to deny access to images from others, there is no .htaccess file on netlify so I can’t do it because it is static hosting. Is there a way to block access to my website files with netlify? if so how? thank you.  
I would like to prevent access to folders

---

<div class="post-metadata">

**Author:** ![SamO](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/samo/32/41847_2.png) [@SamO](https://answers.netlify.com/u/SamO)\
**Post date:** [January 12, 2023, 2:12pm UTC](https://answers.netlify.com/t/deny-access-file/83065/2 "2023-01-12T14:12:12Z")

</div>

Hi @BlacksARkwop 👋🏿,

Thank for reaching and welcome to the forums!

I have one of two options that might help you as I’m not totally sure if this is what you’re asking.

We have a support guide that covers access control over your Netlify sites. [[Support Guide] Access control options for your Netlify sites](https://answers.netlify.com/t/support-guide-access-control-options-for-your-netlify-sites/31289)

You can also use a password protection which allows you to lock all or select parts of your site with a password. [Password protection | Netlify Docs](https://docs.netlify.com/visitor-access/password-protection/#app)

I hope this helps.

---

<div class="post-metadata">

**Author:** ![BlacksARkwop](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/blacksarkwop/32/23695_2.png) [@BlacksARkwop](https://answers.netlify.com/u/BlacksARkwop)\
**Post date:** [January 13, 2023, 9:58pm UTC](https://answers.netlify.com/t/deny-access-file/83065/3 "2023-01-13T21:58:21Z")

</div>

Hi, I solved it, I created the \_redirects file and set that when someone wants to access the folder, it is redirected to an HTTP 404

---

<div class="post-metadata">

**Author:** ![SamO](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/samo/32/41847_2.png) [@SamO](https://answers.netlify.com/u/SamO)\
**Post date:** [January 15, 2023, 4:32pm UTC](https://answers.netlify.com/t/deny-access-file/83065/4 "2023-01-15T16:32:00Z")

</div>

Hi @BlacksARkwop 👋🏿 ,

Thank for coming back and letting us know what worked for you. This will help others in the future. Happy building. 🚀 :netliconfetti:
