How to disable entity tags (ETags)

This article describes how to prevent your web site from sending entity tags (ETags) in the HTTP headers.

About Etags

Entity tags (ETags) are used in HTTP headers to manage web caching behavior. They provide a way for web clients to determine if their cache content matches the content on the web server. If the entity tags for a particular resource (such as an image file) do not match, the web client sends a request to the server to download the most recent version.

By default, entity tags are enabled on your hosting account. However, there may be scenarios where you do not want to send entity tag headers. For example, you might want to disable entity tags during site development or to test web caching.

Disabling Etags

To disable sending entity tags in the HTTP headers, add the following two lines to an .htaccess file in your account's public_html directory:

Header unset ETag
FileETag None

The changes take effect immediately. To re-enable entity tags, comment out or delete the two lines in the .htaccess file.

To verify the entity tag settings in the .htaccess file are working correctly, examine the raw HTTP headers sent between the browser and web server. To do this, use a browser plugin that displays the raw headers such as Live HTTP headers for Mozilla Firefox, or the Developer Tools feature in Google Chrome.

More Information

For more information about the FileETag directive, please visit https://httpd.apache.org/docs/2.2/mod/core.html#fileetag.

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.