So you’ve just run a test on your website to see how fast it goes. You get an F, you fail, or get some other score you’re not happy with. You read the notes, and they tell you that you need to “leverage browser caching”. You have a cPanel based VPS or shared/reseller hosting account and have no idea where to go and do this.

It’s quite simple. This works with almost all web servers and has nothing to do with your control panel. All you do is:

1) Go into your websites FTP and open the .htaccess file.

2) You might see some WordPress ‘stuff’ in there or other information. Leave it all there. Simply ADD the following to your .htaccess file above everything that is already there.

<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType text/html “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 1 month”

That’s it. If you have a WordPress website, Joomla, or any with images or alot of code, this will be VERY valuable as it makes the difference between failing or passing a speed ¬†test on your website. Thank you!