Unexpected cache rule ExpiresDefaultfound in .htaccess file




Wordpress LScache Plugin: Unexpected cache rule ExpiresDefaultfound in .htaccess file

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi, I am getting this error on my WordPress dashboard > Unexpected cache rule ExpiresDefault found in .htaccess file. This rule may cause visitors to see old versions of pages due to the browser caching HTML pages. If you are sure that HTML pages are not being browser cached, this message can be dismissed. You can check the image here > https://prnt.sc/22rqDqVOi0o_ I found this on my websites .htaccess file > ## EXPIRES HEADER CACHING ## 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 image/svg access 1 year ExpiresByType text/css access 1 month ExpiresByType application/pdf access 1 month ExpiresByType application/javascript access 1 month ExpiresByType application/x-javascript access 1 month ExpiresByType application/x-shockwave-flash access 1 month ExpiresByType image/x-icon access 1 year ExpiresDefault access 2 days ## EXPIRES HEADER CACHING ##Expand Do I need to all of this code? or just > ExpiresDefault access 2 days You can check the screenshot here > https://prnt.sc/sw70A-S982tq The page I need help with: https://www.viewsnews.in/ FYI: Expires has nothing to with LiteSpeed cache. Its a Apache directive that controls cache behaviour for static sources like images. Expires Directive controls the overall time to live for static sources and you should leave it. But again, it has nothing to do with cache plugin. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Expires Hi, suggest to remove all cache-related rules that is not generated by LSCWP best regards, That means I have to remove all of this below code right? ## EXPIRES HEADER CACHING ## 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 image/svg access 1 year ExpiresByType text/css access 1 month ExpiresByType application/pdf access 1 month ExpiresByType application/javascript access 1 month ExpiresByType application/x-javascript access 1 month ExpiresByType application/x-shockwave-flash access 1 month ExpiresByType image/x-icon access 1 year ExpiresDefault access 2 days ## EXPIRES HEADER CACHING ##Expand Or just this? > ExpiresDefault access 2 days That means I have to remove all of this below code right? No, although plugin support gives other suggestion. Expire and Cache-Control headers are Must Have Basics for ergonomic handling of caching for static sources. If you remove Expire headers it will not prevent that users see old images, because there is a more important cache header: Cache-Control header is responsible how long images and other static sources are cached in browser. You can change the Time To Live how long images are cached in browser, but if you decrease this time you will get bad Pagespeed score, because Pagespeed expects 1 year or 31536000 seconds. Okay, Thank you @CacheCrawler for the clarity on this.



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference