Setting up Server Side Caching to Boost SEO
By now you’ve probably done tests on Woorank or Seositecheckup, and have seen that that your site could benefit from server side caching, or have the browser cache the static content from your website. What does that mean? Basically instead of your browser reloading every asset (image, font, css, etc) every load, we can tell the browser to cache this content for a certain amount of time because these do not change often. This greatly reduces load time, thus improving your overall SEO.
So how do we do this?
If you are using GoDaddy, Host Gator, or anything like that, it is actually very easy. Just skip to the bottom section named “Setting up .htaccess”.
Make sure you have Apache set up.
sudo a2enmod mod_expires
This enables the mod_expires module for apache.
Next, run this:
NOTE: If you are not running Ubuntu, switch apache2 with httpd.
Directory block in the file.
Below that block, paste this and replace the path to your web root:
<Directory /YOUR/PATH/HERE> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
sudo service apache2 restart
Setting up .htaccess
In the root of your web directory (where your index.html, index.php, etc is) create a file named
.htaccess. Don’t forget the “.” in front of the file name.
Paste the following content into it:
And just like that you have enabled server-side caching!