Wrong warning “Image Headers Expire” in SEO Analysis part

#504490
  • Resolved SA AR
    Rank Math free

    Hi Dear Sir/Madam,

    Recently, I suddenly have a warning with this title “Image Headers Expire”, and it says: Your server is not using expires header for your images.

    That’s weird, because I have Litespeed Cache plugin and the “browser Cache” setting is on!
    I followed your guide page “How to Add Expires Headers to Your WordPress Website” and checked my .htaccess file, found that the exact same code this guide mentioned is there (generated by Litespeed Cache)!
    Finally, I tested my page with PageSpeed Insights and GTmetrix, there was no warning about “Image Headers Expire”, and again tested it with Browser Caching Checker Website, and it’s report showed that the image caching was ok for all the images (Type: cache control)!

    So, I think that this warning in SEO Analysis is wrong, but I don’t know how to fix it!? I tried clearing Analysis Information and Caches, still no success.

    I was wondering if you can help me how to fix it.
    Thanks in advance for your help.

    Sincerely,

Viewing 10 replies - 1 through 10 (of 10 total)
  • Nigel
    Rank Math business

    Hello,

    Thank you for contacting Rank Math for help with the “image headers expire” warning on your website.

    Please may you share the URL of the affected website so we can check that the “image headers expire” module has been installed correctly. You can add the website URL in the designated sensitive data area to keep it private.

    Looking forward to helping you.

    SA AR
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Md. Sakib Khandaker
    Rank Math agency

    Hello,

    As you mentioned that you already have the rules mentioned in this KB in your .htaccess, please try adding the following line to the .htaccess file, as I can see that in your site, you mostly have images with webp format:

    ExpiresByType image/webp “access 1 year”
    

    Or you can directly paste the following one by replacing the current one to see if that works for you:

    <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/html "access 1 month"
    ExpiresByType text/css "access 1 month"
    ExpiresByType text/javascript "access 1 month"
    ExpiresByType text/x-javascript "access 1 month"
    ExpiresByType image/jpeg "access 1 year"
    ExpiresByType image/jpg "access 1 year"
    ExpiresByType image/png "access 1 year"
    ExpiresByType image/svg "access 1 year"
    ExpiresByType image/gif "access 1 year"
    ExpiresByType image/webp "access 1 year"
    ExpiresByType application/pdf "access 1 month"
    ExpiresByType application/javascript "access 1 month"
    ExpiresByType application/x-javascript "access 1 month"
    ExpiresByType application/xhtml+xml "access 1 month"
    ExpiresByType application/x-shockwave-flash "access 1 month"
    ExpiresByType image/x-icon "access 1 year"
    ExpiresDefault "access 4 days"
    </IfModule>

    Once done, flush the analysis cache by heading over to Rank Math > Status & Tools > Database tools > Clear SEO Analyzer and re-run the SEO Analysis.

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    SA AR
    Rank Math free

    Hi Dear Md. Sakib Khandaker,

    I had tested what you said, before starting to open a ticket here.
    You know, as I said earlier, for me this code generated automatically by “Litespeed Cache Plugin” in my .htaccess file. When I was reading your guide, I examined my code thoroughly. It had the line you said like this:
    ExpiresByType image/webp A31557600

    But, just to ensure, I did what you said again:
    I removed the above line from my code, and inserted your line (ExpiresByType image/webp “access plus 1 year”), then flush the analysis cache and re-run the SEO Analysis, still no success.

    You know, I’m sure that I hadn’t this warning before (My SEO Analysis Score was 100/100) , and I didn’t change anything relating to this code, but then suddenly …
    That’s weird, what should I do now?

    Thanks again in advance for your help.

    SA AR
    Rank Math free

    Hi,

    Still no answer?

    Thank you.

    Md. Sakib Khandaker
    Rank Math agency

    Hello,

    I just heard back from the internal team that Rank Math supports only the image formats that supported by WordPress. I’m sorry for the confusion earlier.

    Also, our tests look for the first image on the page and see if it has the expires headers in the HTTP response. As your site’s first image is in the webp format, the webp format is not being analyzed by Rank Math, and you’re encountering the error on SEO Analysis.

    In this case, you can simply ignore the warning, since this won’t have an impact on your SEO/rankings.

    Hope that helps, and please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

    SA AR
    Rank Math free

    Hi,

    As I know, webp format is supported by WordPress, so as you said, Rank Math must support it too? no?

    Anyway, so if I change the format of first image in my site to jpeg, that will be ok? and how can I find the first image in my site? is it my logo?

    Finally, do Rank Math have any plan to analyze webp format in future updates?

    Thank you for helping me to understand what was the problem.

    Sincerely.

    Md. Sakib Khandaker
    Rank Math agency

    Hello,

    As I know, webp format is supported by WordPress, so as you said, Rank Math must support it too? no?

    WordPress basically supports the image formats .jpg, .jpeg, .png, .gif, .ico. Hence, Rank Math doesn’t analyze the webp format yet.

    Anyway, so if I change the format of first image in my site to jpeg, that will be ok? and how can I find the first image in my site? is it my logo?

    Changing the first image might work in this case. To look for the first image, you can search for first <img tag in your page source.

    Finally, do Rank Math have any plan to analyze webp format in future updates?

    I’ve shared the suggestion to the internal team and we’ll see if there’s something we can do about it.

    Hope that helps, and please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

    SA AR
    Rank Math free

    Hello,

    Ok, I’ll check it out.

    Thank you so much for your patience and guidance on this matter.

    Sincerely.

    Md. Sakib Khandaker
    Rank Math agency

    Hello,

    Glad that helped.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

The ticket ‘Wrong warning “Image Headers Expire” in SEO Analysis part’ is closed to new replies.