Enable mod_expires in your hosting account

Enable mod_expires in your hosting account

Because we do not enable mod_expires at the global level, you need to enable it in your .htaccess file. You can enable it on a per-directory basis and it applies recursively.

This example enables mod_expires for a set of common image types and CSS files:



<IfModule mod_expires.c>
    # Activate mod_expires for this directory
    ExpiresActive on

    # locally cache common image types for 7 days
    ExpiresByType image/jpg "access plus 7 days"
    ExpiresByType image/jpeg "access plus 7 days"
    ExpiresByType image/gif "access plus 7 days"
    ExpiresByType image/png "access plus 7 days"

    # cache CSS files for 24 hours
    ExpiresByType text/css "access plus 24 hours"
</IfModule>

More info on this can be found in the Apache Mod_Expires documentation
    • Related Articles

    • Enable GZip compression using easyapache whm/cpanel

      GZIP You can easily speed up your WordPress, Joomla, Drupal install by enabling Gzip via EasyApache. EasyApache is an easy way to enable Gzip compression and will bring your PHP script loading times down.  Google Page Speed takes account of Gzip ...
    • Instant domain access mod_userdir

      Instant domain access in cpanel allows users to access the Website when they don't have a real domain name or when real domain name is temporarily unavailable (no DNS Zone created and registered). Apache’s mod_userdir allows users to view their sites ...
    • Dedicated IP with Plesk Reseller Hosting

      Unfortunately, with the depletion of IPv4 IP addresses globally, these really are not as readily available as they once used to be and each usage needs to be absolutely justified you can read more about IPv4 depletion here ...
    • Reseller - Enable CVV Field In Billing Profile

      To enable the CVV (three or four digit) for credit cards in the billing profile for end users, perform the following: Log into your reseller account at cp.cartikahosting.com Go to Settings > Signup Guard Check CVV Validation Click Submit
    • Adding Subdomain to Alternate HSphere Account

      If you are wanting to add a subdomain to an HSphere account, keep in mind that if the root domain is already assigned to an HSphere account, you cannot assign subdomains to a different account than the account that owns the domain. Some alternatives ...