XML Sitemap: Types & specific details!
XML sitemaps have always been a practical tool for submitting URLs to search engines. However, in times of increased use of JavaScript on websites, it is essential to deal with this topic.
XML sitemap basics
The more extensive and complex a page is, the more time-consuming it is for search engines to crawl it. Here, the work of the search engine crawlers can be made easier with corresponding XML sitemaps. If JavaScript is used in certain areas of the page (e.g. navigation), crawling becomes even more complex and an XML sitemap becomes even more important or even indispensable.
All ranking-relevant URLs can then be entered into an XML sitemap. URLs that cannot or should not be indexed anyway should be deliberately left out. To define a structure in sitemaps, you can create several sitemaps and bundle them in a sitemap index. You can find out how to do this here.
The outline XML sitemaps
In a sitemap index, you can link any number of sitemaps. There are countless possibilities to structure them, e.g:
- Sitemaps for individual country directories
- Sitemaps for individual page areas (store & content area)
- Sitemaps for different page types
In addition to classic HTML pages, individual page elements such as images and videos can also be listed in individual sitemaps. I will discuss these in more detail below.
Image XML Sitemap
Image SEO should never be neglected. Optimized images should always be part of an optimized page because they can even rank in the image search and are also important for the topic PageSpeed.
There is various information that can be stored about images in an image sitemap. Below you will find an example of what is possible:
The introductory definition of the sitemap as an image sitemap:
<?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″
xmlns:image=”http://www.google.com/schemas/sitemap-image/1.1″>
The following lines name the URL where the defined image is located:
<url>
<loc>http://yourawesomewebsite.com/sample.html</loc>
<image:image>
The exact properties of the image are now defined:
<image:loc>http://yourawesomewebsite.com/image.jpg</image:loc>
<image:caption>Image caption</image:caption>
<image:geo_location>Geo location of the image</image:geo_location>
<image:geo_location>Title of image</image:geo_location>
</image:image>
</url>
</urlset>
The tags <image:caption>, <image:geo_location> and <image:title> are optional. Regardless of this, optimized images should of course be labeled with a keyword, an alt tag, and a title, regardless of the sitemap.
Video XML sitemap
Surprisingly often, the use of videos on websites is still avoided in SEO, which is probably also due to the supposedly high production costs. However, videos can greatly enhance websites and are also suitable, for example, to explain complicated issues in a simple way.
The structure of a video sitemap is a bit more complicated than a picture sitemap. You can find all required and optional tags directly at Google at https://developers.google.com/search/docs/advanced/sitemaps/video-sitemaps?hl=de.&visit_id=637537818421808354-688190894&rd=1.
As an alternative to a sitemap, videos can also be tagged using structured data, the corresponding properties can be found here: https://schema.org/VideoObject. Especially if a page contains only a few videos, this might be a much easier method.
Important attributes for XML sitemaps
There are more and more websites with navigation that is exclusively JavaScript-based or even cases where almost the entire page is built on JavaScript. Since JavaScript is difficult for search engines to crawl (if they can crawl it at all), it is important to store all relevant URLs in XML sitemaps. However, it is important to assign meaningful attributes to them.
changefreq
This can be used to tell search engines how often the page is likely to change, settings from “never” to “always” are possible.
lastmod
The date of the last modification of the file.
priority
The importance of a URL in relation to the other URLs on a web page. The values can vary between 0.0 and 1.0, the default is 0.5.
All attributes should be used as correctly as possible, i.e. with correct assumptions. If a URL is never changed, you should not claim that it is changed daily. Search engines don’t like it when you give them the wrong information.
These three attributes that can be assigned to a URL help search engines prioritize the individual URLs. This is especially important for large, complex and/or JavaScript-heavy pages.
Final thoughts
Especially if you run very large (number of URLs), complex (different page areas and hierarchy levels) and/or JavaScript-heavy websites, it makes a lot of sense to deal with XML sitemaps.
Here, however, you should not just create a sitemap for all content, but first, consider which content you want to put there. Then you have to consider how you want to structure it and what additional information you want to communicate beyond the URL.
With a good sitemap structure, you help to get significantly more content into the search engine index than if you simply upload a URL list!
Do you want to get more SEO tips? Then sign up for our newsletter now!
All the best,
Fabian