How To Configure Entity Tags (eTags)|Speed Up WordPress

Last updated on July 5th, at 03:24 pm

Configure entity tags (eTags) is one of the most frequent suggestions you will get to improve page performance when you check your site speed in GTmetrix or Pingdom tools.

Pingdom tools warning message:

Configure Entity Tags

What is Configure entity tags or ETags means?

Details from Yahoo, Entity tags (ETags) are a mechanism web servers and browsers use to determine whether a component in the browser’s cache matches one on the origin server.

ETag headers identify whether the version of a resource cached in the browser is the same as the resource at the webserver. A visitor’s browser stores ETags.

When a visitor revisits a site, the browser compares each ETag to the one it stored. Matching values cause a 304 Not-Modified HTTP response that indicates the cached resource version is current.

Since ETags are typically constructed using attributes that make them unique to a specific server hosting a site, the tags will not match when a browser gets the original component from one server and later tries to validate that component on a different server.

The problem with ETags is that they typically are constructed using attributes that make them unique to a specific server hosting a site. ETags won’t match when a browser gets the original component from one server and later tries to validate that component on a different server, a situation that is all too common on Web sites that use a cluster of servers to handle requests.

By default, both Apache and IIS embed data in the ETag that dramatically reduces the odds of the validity test succeeding on web sites with multiple servers.

How to Configure Entity Tags (ETags)

There are advantages and disadvantages of ETags.

Advantages of ETags (Single Server):
Better caching and faster load times
Lower server load

Disadvantages of ETags (Multiple servers):
Slower load times and multiple caching of the same resource
Higher server load

Ways to Configure Etags 

There are two ways to fix ETags
From Apache config
From .htaccess

Configure entity tags (ETags) from Apache config

You need to have the root of your server or SSH access. Open your httpd.conf. To do this in Apache add the following lines to your configuration file.

<Directory /usr/local/httpd/htdocs>
FileETag MTime Size
</Directory>

Configure entity tags (ETags) via .htaccess file

If you don’t have SSH access then you can fix configure entity tags (ETags) via your .htaccess. Add these lines of code in your .htaccess file

Header unset Etag
FileETag none

This will solve your Configure Entity Tags (ETags) problem, improving browsing cache-ability and website speed.