- XML Image Sitemaps
- XML Image Sitemap Benefits
- Multiple Sitemaps
- Google Webmaster Tools
- Common Mistakes
XML image sitemaps are vital for the indexation of your images by search engines; they should be a concise list of all images that you want to be indexed.
They improve your chances of having your images appear in the Image Search results. This can help Google to discover images that may have otherwise not been found.
Ensure the XML file is properly formatted and passes validation tests. Simply run the file through a sitemap validator to test. Once submitted to Google Search Console, Google will inform you of problems with the XML sitemap but it is better to pre-empt this with your own tests first.
Below we list the different components or metrics that can be added to an XML sitemap.
The code below is an example of how a single entry should look in an XML sitemap along with the opening code:
<?xml version="1.0" encoding="UTF-8"?>
We describe in more detail what each of the above components means and how it should be used.
If a site has thousands of images it becomes more important to distribute these images over several sitemaps, this makes it easier to identify indexing issues.
By having smaller sitemaps, you can more easily see what images are not being indexed.
For example, you could have XML sitemaps for images used in your blog, for products, infographics, etc… If you have a single sitemap with all images listed in it, and you notice that only 50% of them are indexed, you have no way to easily dive deeper into the issue. Vs a series of smaller image sitemaps, you could more easily and quickly see where the problem exists (most of the time).
There should be no more than 1,000 links per sitemap and the maximum file size should not exceed 10MB, Sitemaps.org confirm this. This helps prevent your web server from being weighed down serving large files. 1,000 URLs is a lot of URLs, see the section on site structure below for more information on how to break this up.
Sitemap structure should reflect site structure, for example:
- Master Category (sitemap) – contains links to all other category sitemaps
- Category 1 (sitemap) – contains all products in this category
- Category 2 (sitemap) – contains all products in this category
Group similar content or content located in a similar location into sitemaps to create consistency and logical structure.
A Sitemap Index is the master XML sitemap that links to all other sitemap files or all of the files that contain links to all the other sitemaps.
We cover this in more detail in another part of the knowledge base that addresses SEO Tools and how to use them. But for now, it is worth noting that the image sitemap should be submitted to Google Webmaster Tools.
We list below the most common mistakes we see with XML sitemaps.
Ensure the sitemap is up to date and does not include duplicate entries or links to pages that are no longer present on the site. This can be an issue if you use a tool to create a sitemap and you do not filter out duplicate entries such as with trailing slashes and upper and lower case URL characters.
Do not include images in the image sitemaps that you have disallowed from being crawled by the robots.txt; this wasted Google’s time and provides no benefit to you. In fact, if this happens on bulk it can also cause other problems; such as seeing increased volumes of images not being indexed.
Stipulating incorrect parameters such as ‘loc’ or ‘title’ can slow or impede proper indexing of the images by Google.
Having too many links in a sitemap makes problem solving difficult when it comes to indexing errors, also if the total sitemap is too big it can cause performance issue.