Expires headers

#835024
  • Resolved Marcia M Boothe
    Rank Math free

    SEO analysis says images not using expires headers.

    Currently no expires headers in my htaccess file. Before I add the expires headers to the file, I want to make sure this won’t conflict with my current setup.

    Please advise what settings may need to be changed after adding expires headers.

    1. Cloudflare browser Cache is set to respect existing headers.

    2. I have Super Page Cache for Cloudflare plugin and have following settings (defaults).

    Cloudflare Cache-Control max-age set to 31536000

    Browser Cache-Control max-age is set to 60

    Automatically purge the Cloudflare’s cache when something changes on the website.

    Thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for reaching out with your query about adding expires headers to your images.

    Adding expires headers to your images is a good practice to improve website performance and user experience. Based on the settings you provided:

    1. Cloudflare Browser Cache: Since Cloudflare is set to respect existing headers, adding expires headers to your images should work well with this setting. Cloudflare will honor the expires headers you set in your .htaccess file.

    2. Super Page Cache for Cloudflare Plugin Settings:

      • Cache-Control max-age: With Cloudflare Cache-Control max-age set to 31536000, it indicates that Cloudflare will cache resources for a year. Adding expires headers to your images will complement this setting by providing additional caching instructions.
      • Browser Cache-Control max-age: The Browser Cache-Control max-age set to 60 might be a bit low for images. You may consider adjusting this value to a higher duration to leverage browser caching effectively after adding expires headers.
      • Automatic Cache Purging: The automatic cache purging feature ensures that Cloudflare’s cache is updated when changes occur on your website, which will work well even after adding expires headers.

    After adding expires headers to your images, you may want to monitor your website’s performance and caching behavior to ensure everything works as expected. If you encounter any issues or have further questions, feel free to reach out for assistance.

    If you need more detailed guidance or encounter any issues after implementing these changes, please update this ticket, and our support team will assist you promptly.

    Thank you for your attention to optimizing your website’s performance!

    Sources:
    Analyzing Your Site’s SEO with Rank Math’s SEO Analysis Tool
    How to Edit Your htaccess File Using Rank Math » Rank Math
    How To Exclude Rank Math Sitemaps from Caching » Rank Math
    Advanced Tab in Rank Math SEO’s Meta Box

    Per Super Page Cache for Cloudflare plugin developer:

    “Inside the plugin settings under the cache tab if you scroll down you can enable the option to add cache-control header for static files. When cache-control header is being used expires header (which is already ancient and deprecated) is not needed.”

    I have always had “Cache control header” enabled instead of adding expires headers. So is it okay for me to ignore that “images not using expires headers” warning? Or is that going to be a problem for Rank Math?

    Hello,

    Thank you for contacting us and sorry for any inconvenience that this issue might have caused.

    Our tests look for the first image on the page and see if it has the expires headers in the HTTP response which the first image on your page doesn’t have.

    We’ve checked your site and found that your server is using a newer implementation called cache-control, but our system cannot detect those and as such it fails this test. That won’t have any negative impact on SEO, and you can simply ignore the error on the SEO Analysis report.

    In simple words, you have the Expires Headers for your images, but with a different implementation which Rank Math can’t detect yet and you can avoid the error on your SEO analysis.

    Hope that helps.

    Thank you for confirming what I suspected.

    Hello,

    We are glad we could address your concern.

    Do you have further inquiries and concerns or should we go ahead and close this ticket?

    We look forward to helping you.

    Thanks.

    You’ve answered my questions. Thank you.

    Hello,

    We are glad we could address your concern.

    Please feel free to create a new forum topic if you do have another question in the future.

    It will be our pleasure to assist you again.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

The ticket ‘Expires headers’ is closed to new replies.