-
Hi again.
Around 10% of the images in my sitemap lead to a 404 page. Not having any redirections on them. Whats the problem?
Thx
-
Hello,
We apologize for the issue you are facing with the images in your sitemap leading to 404 pages. This can happen for a few reasons:
- Images Have Been Moved or Deleted: If the images were moved to a different location or deleted, the original URLs would return a 404 error.
- Incorrect URLs in the Sitemap: Sometimes, the sitemap may contain outdated or incorrect URLs that no longer point to valid images.
- Server Configuration Issues: There could be server misconfigurations that prevent the images from being accessed correctly.
To resolve this issue, you can:
- Check the URLs: Verify that the URLs in your sitemap are correct and point to existing images.
- Update Your Sitemap: If any images have been moved or deleted, update your sitemap accordingly to remove or correct those entries.
- Implement Redirects: If images have been moved, consider setting up 301 redirects from the old URLs to the new ones to avoid 404 errors.
- Flush Permalinks: Sometimes, flushing permalinks can help resolve issues with sitemap accessibility. You can do this by going to the Permalinks settings in your WordPress dashboard and clicking Save Changes without making any modifications.
For more detailed guidance on fixing sitemap issues, you can refer to our Rank Math Sitemap Issues and Their Fixes article.
Thank you for raising this concern! If you need further assistance, please reply to this ticket, and a human agent from our support team will assist you.
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank MathHello,
Could you please share the sitemap URL so we can check as well? You can add it to the sensitive data section by editing your first post
It is completely secure, and only our support staff has access to that section.
Meanwhile, please follow these steps to flush your sitemap cache:
1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
https://rankmath.com/kb/exclude-sitemaps-from-caching/3. Disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on your site:
/** * Filter if XML sitemap transient cache is enabled. * * @param boolean $unsigned Enable cache or not, defaults to true */ add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
If you’re not sure how to add this code, you can follow this guide:
https://rankmath.com/kb/wordpress-hooks-actions-filters/Looking forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
We’ve checked a sample post in your sitemap, and indeed the image is getting a 404.
However, those images are still added to your content, and the photos are also not showing on your content. You may refer to the screenshot in the sensitive data section.
In this case, we recommend fixing the images on your content as the sitemap automatically includes the images on your content even if they are showing properly or not.
If you need assistance, you may get in touch with your web host to check the image file path to ensure they are accessible and should not return 404.
Looking forward to helping you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.
The ticket ‘Sitemap: Many image 404s’ is closed to new replies.