---
title: "What is .htaccess?"
term: ".htaccess"
description: ".htaccess is a directory-level configuration file used by the Apache HTTP Server, and some compatible web servers, to control settings such as redirects, URL rewriting and access restrictions for a website."
url: "https://glossary.io/htaccess/"
published: "2026-11-22T20:50:28.100Z"
updated: "2026-11-22T20:50:28.100Z"
topics:
  - "Hosting, CDNs and performance"
wikidata: "https://www.wikidata.org/wiki/Q159900"
---

# What is .htaccess?

**Definition:** .htaccess is a directory-level configuration file used by the Apache HTTP Server, and some compatible web servers, to control settings such as redirects, URL rewriting and access restrictions for a website.

The name is short for hypertext access, and the leading dot makes it a hidden file on Unix-like systems. An .htaccess file placed in a directory overrides the main [Apache](https://glossary.io/apache-http-server/) configuration for that directory and everything below it, without restarting the server. That lets site owners on shared hosting change things they otherwise couldn't, such as adding redirects, password-protecting a folder, setting cache headers or blocking certain visitors.

WordPress and many other applications use .htaccess with Apache's mod\_rewrite module to create clean permalinks. Because the server has to look for and read these files on every request, they can slow sites down, and servers such as [nginx](https://glossary.io/nginx/) don't support them at all. Some hosts, including [WP Engine](https://glossary.io/wp-engine/), have replaced .htaccess with their own rules tools.

## .htaccess resources

- [.htaccess on Wikipedia](https://en.wikipedia.org/wiki/.htaccess)
- [WP Engine adds Web Rules as an .htaccess alternative](https://coywolf.com/news/web-development/wp-engine-web-rules-htaccess/)
- [WP Engine will no longer support .htaccess with release of PHP 7.4](https://coywolf.com/news/web-development/wp-engine-deprecating-htaccess-php-7-4/)

## Related terms

- [WP Engine](https://glossary.io/wp-engine/)
- [Apache HTTP Server](https://glossary.io/apache-http-server/)
- [nginx](https://glossary.io/nginx/)
- [PHP 7.4](https://glossary.io/php-7-4/)
- [Permalink](https://glossary.io/permalink/)

**Topic:** [Hosting, CDNs and performance](https://glossary.io/topics/hosting/)

## Cite this definition

- APA: What is .htaccess? (2026, November 22). Glossary. https://glossary.io/htaccess/
- MLA: “What Is .htaccess?” Glossary, Coywolf, 22 Nov. 2026, glossary.io/htaccess/.
- Chicago: “What Is .htaccess?” Glossary. Coywolf. November 22, 2026. https://glossary.io/htaccess/.

Published November 22, 2026.
