Knowledge Base
How to Enable Directory Indexing in DirectAdmin
Showing or Hiding Directory Listings
Control whether visitors can see file listings when there's no index file.
What is Directory Indexing?
When someone visits a folder without an index.html/index.php, they either:
- See a list of files (indexing enabled)
- See a 403 Forbidden error (indexing disabled)
Disabling Directory Indexing (Recommended)
For security, disable indexing. Add to .htaccess:
Options -Indexes
Enabling Directory Indexing
If you want to allow file browsing:
Options +Indexes
Custom Index Files
Tell the server which files to use as index:
DirectoryIndex index.html index.php home.html
Security Recommendation
Always disable directory indexing unless you specifically need it. Enabled indexing can expose:
- Backup files
- Configuration files
- Development files
- Your site structure
Per-Directory Settings
You can have different settings for different folders by placing .htaccess files in each directory.