We provide premium cPanel hosting!
  • Contact
  • View Cart (0)
  • Client Area
TNG Web Hosting
  • Domains
    Register Domain
    Your very own website address
    Transfer Domain
    Move your domain to TNG Web Hosting

    Hundreds of customer's around the world trust TNG Web Hosting to manage their domain. We provide freedom and control including full access & the ability to move/sell your domains.

  • Web Hosting
    Shared Hosting
    Premium cPanel web hosting

    We provide a wide range of services for your business including Web Hosting, Dedicated Servers, VPNs & more.

  • Company
    Company
    Learn more about TNG Web Hosting
    Why Choose Us
    The reasons why to choose us
    Testimonials
    Lots of feedback from our customer's
    Announcements
    Get up to date with the latest news

    Learn more about what makes TNG Web Hosting the best choice for web hosting services.

  • Support
    Contact Form
    Contact our pre-sales department
    Submit Ticket
    Contact our support via ticket
    Knowledgebase
    View our vast documentation

    If you have a pre-sale question or issue with your website we are here to help.

  • Order

Knowledgebase

Portal Home > Knowledgebase > Security > How to Disable Directory Browsing Using the htaccess Rule

  Categories

Backup/Restore
4
CloudLinux (cPanel)
10
cPanel - Control Panel
24
Databases
11
DirectAdmin
48
DNS - Nameservers
6
Domain Management
10
Email
17
FTP
9
Installing a Control Panel
6
Mail Filters & SPAM
8
Mobile
11
Others
3
PayPal
7
Plesk
47
Security
10
SiteWorx/InterWorx
58
Softaculous
69
SolusVM 1
18
SolusVM 2
16
SSL
5
Virtualizor
19
WHM
18
WordPress
17

  Categories

  Support

My Support Tickets
Announcements
Knowledgebase
Downloads
Network Status
Open Ticket

How to Disable Directory Browsing Using the htaccess Rule Print

  • 0

For security purposes, you should disable directory browsing on your website so no one can see the files/directories of your website.


You can disable Directory Browsing by adding the below line to your dot htaccess file.

Options -Indexes




Was this answer helpful?

Related Articles

How to Password Protect a Directory in cPanel You can lock a directory with a password using the cPanel's Directory Privacy. 1. Log in to your... How to Block an IP Address to Deny Access to Your Website You can blacklist an IP Address to deny access to your website.1. Log in to your cPanel account.... How to Protect Website Images From Being Displayed at an External Website External websites may display your website images on their websites, thus stealing your... How to Block Any IP Address via an htaccess Rule If you want to block an IP Address, you can add the below lines to your htaccess file. order... How to Protect the htaccess File You can prevent unauthorized access to your htaccess file by adding this rule to the file: #...
« Back

  Support

My Support Tickets
Announcements
Knowledgebase
Downloads
Network Status
Open Ticket
900+ people trust us!
Join them today
Our Partners
Services
  • Shared Hosting
Domains
  • Register Domain
  • Transfer Domain
Company
  • Company
  • Why Choose Us
  • Testimonials
  • Announcements
Support
  • Contact Form
  • Submit Ticket
  • Knowledgebase
About Us
TNG Web Hosting provides premium web hosting, domain registration & security services to businesses and people around the world.more
HQ: Ledyard, CT USA
sales@tngweb.host
LEI: 9845009ER7E4FEF4EC17
TNG Web Hosting © 2025 | All rights reserved
  • Terms Of Service
  • Acceptable Usage Policy
  • Privacy Policy
PayPal logo
Credit Card logo
GoGetSSL logo

Loading...
Loading...

Generate Password

Please enter a number between 8 and 64 for the password length