# Why to Avoid .htaccess Files When You Control Apache Server Configuration

DevFeed: [Why to Avoid .htaccess Files When You Control Apache Server Configuration](<https://devfeed.tech/articles/stop-using-htaccess-files-no-really-31303.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/stop-using-htaccess-files-no-really>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2016-11-24T04:43:00Z

Content type: opinion

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Web Development](<https://devfeed.tech/topics/web-development.md>), [nginx](<https://devfeed.tech/topics/nginx.md>), [hosting](<https://devfeed.tech/topics/hosting.md>)

Tags: [apache](<https://devfeed.tech/tags/apache.md>), [configure](<https://devfeed.tech/tags/configure.md>), [don-t](<https://devfeed.tech/tags/don-t.md>), [file](<https://devfeed.tech/tags/file.md>), [htaccess](<https://devfeed.tech/tags/htaccess.md>), [insights](<https://devfeed.tech/tags/insights.md>), [nginx](<https://devfeed.tech/tags/nginx.md>), [performance](<https://devfeed.tech/tags/performance.md>), [server](<https://devfeed.tech/tags/server.md>), [using](<https://devfeed.tech/tags/using.md>), [webserver](<https://devfeed.tech/tags/webserver.md>), [you-re](<https://devfeed.tech/tags/you-re.md>)

## AI overview

This article argues that .htaccess files add performance overhead in Apache because each request can trigger repeated searches, merging, and reconfiguration. It recommends placing directives in the main Apache server configuration when available, noting that modern web servers such as Nginx do not use .htaccess files.

## Source excerpt

Every CMS under the sun has you configure a .htaccess file if you're using Apache. Don't do it!