.htaccess
🔧 ConfigText-based

.htaccess File — Apache Configuration

text/plain

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

HTACCESS

Drop a .htaccess file here or click to choose

Or drop any file to identify its extension

Expected MIME type:text/plain

Quick Facts

Extension.htaccess
Full NameApache Configuration
MIME Typetext/plain
CategoryConfig
TypeText-based (human-readable)
Typical Size100 B – 10 KB
First Appeared1995

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

VS Code
vim
nano
any text editor
Sublime Text

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.