Ad

Images In Google Image Search Link To Sitemap.xml

- 1 answer

When I search for images on my site, many images return the sitemap when clicked, as you can see here. The sitemap returns no errors in Google Search Console. Am I doing something wrong, or should I wait (for better indexing)?

I followed these instructions: https://support.google.com/webmasters/answer/178636?hl=en

Ad

Answer

It turned out I forgot the image namespace, I now use this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" 
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd 
http://www.google.com/schemas/sitemap-image/1.1 
http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd" 
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>http://www.schindlersalmeron.com/demo</loc>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
    <image:image>
      <image:loc>http://www.schindlersalmeron.com/uploads/demo.jpg</image:loc>
      <image:caption>demo</image:caption>
    </image:image>
  </url>
</urlset>

So I changed this:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">

Into this:

<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" 
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd 
http://www.google.com/schemas/sitemap-image/1.1 
http://www.google.com/schemas/sitemap-image/1.1/sitemap-image.xsd" 
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
Ad
source: stackoverflow.com
Ad