.htaccess File — Apache Configuration
text/plain
Drop any file to identify its extension and type — runs entirely in your browser
Drop a .htaccess file here or click to choose
Or drop any file to identify its extension
text/plainQuick Facts
| Extension | .htaccess |
| Full Name | Apache Configuration |
| MIME Type | text/plain |
| Category | Config |
| Type | Text-based (human-readable) |
| Typical Size | 100 B – 10 KB |
| First Appeared | 1995 |
What Is a .htaccess File?
HTACCESS (Hypertext Access) files are directory-level configuration files for the Apache HTTP Server, the most widely deployed web server in internet history. HTACCESS files provide per-directory configuration that overrides the global Apache settings, enabling URL rewriting (mod_rewrite), access control, authentication, custom error pages, MIME type mapping, caching headers, compression (mod_deflate), SSL redirection, and CORS configuration without requiring server restart or root access. This makes .htaccess files essential for shared hosting environments where users cannot modify the main Apache configuration. Common uses include enforcing HTTPS, removing file extensions from URLs, setting up clean URL routing for frameworks (WordPress, Laravel), blocking specific IP addresses, password-protecting directories, and setting security headers. HTACCESS files are processed for every request to the containing directory (and subdirectories), which can impact performance on high-traffic sites — the official Apache documentation recommends using the main configuration file when possible. The mod_rewrite engine in .htaccess provides powerful regex-based URL manipulation that has defined URL rewriting patterns across the web industry.
How to Open .htaccess Files
Related File Extensions
More Config File Extensions
Other config formats you might encounter
Browse File Extensions by Category
Explore our reference of 259 file extensions with details, programs, and related formats.