J!Extensions Store™
Faq Why using a CDN for images i get errors with images sitemap?

Why using a CDN for images i get errors with images sitemap?

Created on:Monday, 06 April 2015 22:00

When using a CDN to host images on your website, you should take care to links used and generated otherwise they won't get accepted by Google.

You have to ensure that the path for images is not incomplete, because often CDN links are not using complete absolute URLs including the http/https protocol. You can inspect the source code of your website to check if that is the case as shown in the screenshot below.
images

Images with incomplete links missing the protocol won't get accepted by Google when submitted in the images sitemap, so you have to rectify this. All links must be changed from the incomplete path:

//cdn.myhost.com/images/image.png


to the complete path:

http://cdn.myhost.com/images/image.png



Once fixed your CDN links you will be able to generate the images sitemap including all valid links with full URLs that can be submitted to Google.

If you can't fix CDN links, as an alternative you can use the JSitemap parameter shown below to add the missing part of the protocol that will be prepended to the CDN links, such as 'https:'
images