How to Disable ETags in Apache

how to disable etag in apache

ETag (Entity Tag) is an HTTP header used for cache validation and conditional requests from browsers using persistent identification elements that are tagged to a users’ browser. It makes the cache to be more efficient, and saves data bandwidth. However, sometimes, you may want to disable ETag on your website, in case it uses multiple web servers and ETags are likely to differ per server. So let us take a look at how to disable ETags in Apache.

Please note : It is not advisable to disable ETags on your website. It can mess up caching.


How to Disable ETags in Apache

Here are the steps to disable ETags in Apache.


1. Open Apache config file

Open Apache config file in a text editor. You will find it at one of the following locations:

  • /etc/apache2/httpd.conf
  • /etc/apache2/apache2.conf
  • /etc/httpd/httpd.conf
  • /etc/httpd/conf/httpd.conf


$ sudo vim /etc/apache2/httpd.conf


2. Disable ETag

Just add the following line in your Apache config file

FileETag none


3. Restart Apache web server

Restart Apache web server to apply changes

$ sudo /etc/init.d/apache2 start [Debian or Ubuntu]
# sudo apachectl restart [RHEL, CentOS or Fedora]


That’s it! Apache will automatically disable ETags on your website.


About Sreeram Sreenivasan

Sreeram Sreenivasan is the Founder of Ubiq, a business dashboard & reporting platform for small & medium businesses. Ubiq makes it easy to build business dashboards & reports for your business. Try it for free today!