How to Add Expire Headers to Speed Up your WordPress Site

Expire headers wordpress
Spread the love

Expire Headers:- There is alot of way to make you site faster for SEO result. In this article I’m going to tell you how to post a code in your .htaccess file to make your Website Fast for SEO.

Expire Headers tell you browser to cache all content of your site, and load them only after a specified time which is mention in  .htaccess file.

To set Expire Headers for all of your image,js and css file you have to open and edit your .htaccess file and add the following code to the file:


<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css|woff)$">
ExpiresActive On
ExpiresDefault A2592000

FilesMatch sets the Extensions that are influenced by the ExpiresActive manage while the ExpiresDefault sets the cache time, when that time terminates then your site guest program will ask for yet again the documents.

ExpiresDefault is get to time (An) in addition to 30 days (2592000 seconds), so utilizing a similar administer you can set your own ExpiresDefault time(just be mindful so as to compute in a flash).

To add separate Expire Headers rule for each of your filetypes then you can add the following code on your .htaccess.

ExpiresByType image/png A2592000
ExpiresByType image/gif A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType text/javascript A2592000
ExpiresByType application/x-javascript A2592000
ExpiresByType text/css A2592000

If this article is helpfull for you then let me know by adding your comments below.

Leave a Reply

Your email address will not be published. Required fields are marked *

WP Twitter Auto Publish Powered By :