Not a single Image included in the sitemap.

#124331
  • Resolved Passion Marketing
    Rank Math free

    I host all images on cloudfront cdn on a subdomain. I have over 200 images on the entire website and not one of them shows in the rankmath sitemap. I have had this sitemap active for 5+ months and when doing a “site:” on google there is not one image from my cdn that has ever been indexed on my entire site.

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

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    I checked your website url and Rank Math’s sitemap is returning 404 page. Can you please check if you have properly configured Rank Math’s Sitemap module?

    I also discovered that you are using another sitemap plugin (Please see the link in Sensitive Data section).

    Please disable this plugin if you prefer to use Rank Math’s Sitemap, or if you prefer SmartCrawl, disable Rank Math’s Sitemap module.

    After doing so, clear your website’s cache.

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

    Hello,

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

    Thank you.

    Hi Jeremy,

    Thank you for the quick response! I disabled the rankmath sitemap to check other site mapping plugins for a solution and No luck 🙁

    I am using Offload Media for images to be hosted on Amazon Cloudfront CDN on Amazon S3. The domains on my dedicated cdn domain are listed in the document tree as local directories only (not the full https:// url).

    Either way, no sitemap plugin seems to be picking up any of the images on my site hosted on the cdn no matter what I try. I see people using some fancy filters to get it working in Yoast, but none for RankMath.. I really like RankMath!

    Also I just realized since I switched back to the rankmath sitemap, the images that do get crawled are actually only images that are uploaded directly to the wordpress directory and not the cdn.

    Another note is that I have recently and successfully added the cdn domain to google search console.

    Hello,

    Thank you for the follow up.

    The following is the filter you can use to add CDN image URLs to the sitemap.

    
    /**
     * Filter to Add CDN Image URLs in the Sitemap
     *
     * @param string $src  Image URL.
     * @param object $post Post object.
     */
    add_filter( 'rank_math/sitemap/xml_img_src', function( $src, $post ){
    	$src = str_replace( 'http://domain.com', 'https://cdn.domain.com', $src );
    	return $src;
    }, 10, 2);
    

    Hope this helps you. Thank you.

    Hi Michael,

    Thanks for the filter. Any idea how long it will take to see the cdn images appear in the sitemap?

    Hello,

    Sorry for the delay.

    Usually, the changes will reflect on your sitemap right after updating. If the images are still not appearing, please follow the steps below:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. 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/

    I hope that helps. Thank you, and looking forward to your update.

    Hi Reinelle,

    Thanks for listing those tricks. I just tried them all. I flushed the cache following the video but I do no have the number of urls option in the rankmath sitemap settings, I only have the ‘include images and featured images’ options. Do I need to purchase the premium version to get those other options like “Links per sitemap”,”Exlcude posts”,”Ping Search Engines”??

    Anyways I turned the two switches off and on which does reflect in the sitemap on reload I can see the number of images change to zero and back. Then I saved the permalinks as they were to flush the cache as per your video instructions.

    Then I followed the guide for adding advanced rules for WP Rocket and Cloudflare to bypass caching that page. Unfortunately there is no change in the number of images cached on any of the pages. I have even purged the cache on both WP Rocket and Cloudflare with no results.

    I am wondering how I can see exactly what image urls are included in the current rankmath sitemap, but there is no way to know as it only shows the number of images on each page.. On my product page I have 6 images (1 featured) that are uploaded in the main product image slider and it is showing 6 images in the RM sitemap. However, I have 50+ more images on that product page in the body of the page that are not getting included at all in the sitemap. Same goes for all the rest of the pages in my entire site, lots of images in the main content of the post/page.

    Not sure what else I can do..

    Hello,

    I wanted to check how you added the filter but the provided access doesn’t seem to work(check the screenshot in the sensitive section).

    Please ensure you have replaced http://domain.com with your domain and https://cdn.domain.com with the CDN domain in the filter then add it to your theme functions.php file. if the issue still persists, please update the access details so we can check further

    Looking forward to helping you.

    Hello,

    For some reason the account was corrupted, you should be able to log in now. I added the code to the functions.php file via SFTP but I just added it via the theme editor to the funcitons.php in there. Still no change in the number of images appearing in the sitemap.

    If you look at my screenshot you can see the product pages say six images but if you go to that page you will see there are many many more images on that page.

    Thank you and Merry Christmas!

    Hello,

    When it comes to product pages, the images added to the sitemap are the featured image and the product gallery images. If you check your product pages, the images added this way are all included in the sitemap.

    If there is any that is not included and it is a part of the product images/gallery, please include the URL in the sensitive section.

    Looking forward to helping you. Thank you

    Hi,

    I guess I did not realize it was not possible to include images in the body of the page on product pages in the sitemap. However, it appears to be including images in the body of blog posts just fine.

    I guess that is the way it is. I will have to make blog posts with those images if I want them to appear in search results. Makes more sense anyways.

    Thanks for all the help!

    Have a great New Year,
    Calvin

    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 12 replies - 1 through 12 (of 12 total)

The ticket ‘Not a single Image included in the sitemap.’ is closed to new replies.