
Blog Post
Search Engine Optimization

Nadine
Wolff
published on:
The Perfect Sitemap
Table of Contents
Using sitemaps plays an essential role in search engine optimization. It can boost your website's visibility and help get your pages indexed.
In this article, we'll show you how a sitemap is structured and which pages and media files should be listed with their relevant attributes. We'll focus exclusively on the most crucial sitemap when it comes to SEO: the XML sitemap.
What is a sitemap?
A sitemap is a file that provides search engines with detailed information about all the pages and content on your website. Sitemaps use organizational, navigational, and labeling systems to help Google and other search engines crawl and properly categorize your site.
In general, your website benefits from a sitemap because it gives search engines a kind of roadmap for crawling and indexing all the pages listed in it. There are several types of sitemaps, though HTML and XML sitemaps are the most relevant for SEO. An HTML sitemap essentially represents your website's navigation.
In addition, there are several other types of sitemaps:
Visual sitemaps
Alphabetical sitemaps
XML sitemaps
HTML sitemaps
Mobile sitemaps
News sitemaps
Video sitemaps
XML sitemaps
Through a sitemap, search engines get a targeted overview of your website's structural layout. The sitemap needs to be created in a "machine-readable" format, which is why it's called an XML sitemap.
XML stands for "Extensible Markup Language." Using an XML sitemap offers many benefits. Website operators, in particular, can gain a lot by integrating an XML sitemap into their site.
One big advantage is that an XML sitemap helps search engine crawlers find and index new URLs on your website. For very large sites or sites with frequently updated or new content—like e-commerce stores—it can be challenging for crawlers to locate the latest pages and index them. An XML sitemap gives you much better control over how bots navigate your site.
If the content on your website isn't well linked internally, pages won't be able to reference each other easily. A sitemap ensures that Google and other search engines can still discover all your relevant pages.
If you have many content pages that lack strong internal links and don't cross-reference well, you can use an XML sitemap to point search engines directly to them, making sure nothing gets overlooked.
A sitemap can guide crawlers and prioritize pages, letting bots know which ones to focus on first. This is done using the "priority" tag. Example: <priority>0.8</priority>
It's best practice to work with a sitemap index file that organizes smaller "sub-sitemaps." For very large sites, we recommend creating separate sitemaps for different categories or main sections. You should also set up dedicated XML sitemaps for images, videos, and PDF files.
This split is necessary partly because sitemaps have a file size limit (maximum 50 MB), but it also gives you much better control when monitoring your indexed pages in Google Search Console. That's why submitting your XML sitemap to Google Search Console is so important.
Example of a sitemap index file structure:
https://www.example-url.com/sitemap-index.xml
https://www.example-url.com/sitemaps-pages.xml
https://www.example-url.com/sitemaps-posts.xml
https://www.example-url.com/sitemaps-images.xml
https://www.example-url.com/sitemaps-videos.xml
https://www.example-url.com/sitemaps-media.xml
URL XML Sitemap
It's important to place the sitemap index file at the root level of your URL structure.
A complete sitemap entry includes the following details:
URL
Lastmod: The date when the URL was last modified
Changefreq: How frequently the page content is updated (optional, as Google doesn't rely heavily on this tag)
Priority: The priority of an individual page relative to other URLs on your site (optional, but helpful for guiding crawlers)
[caption id="attachment_21502" align="aligncenter" width="508"]

Example of an XML sitemap with a single URL[/caption]
Specifying the last modified date, change frequency, and priority doesn't directly impact your site's rankings. Instead, these tags simply help Googlebot crawl your site more efficiently.
However, using unrealistic values—like setting every page's priority to 1.0 or giving all pages the exact same modification date—can hurt the credibility of your sitemap. In those cases, Google might ignore the tags or, worse, disregard the sitemap entirely.
According to Google, the most important attribute in a sitemap is "lastmod," as it tells the bot whether it has already indexed the latest version or needs to crawl the URL again.
You can find more information on creating a URL sitemap here.
Image XML Sitemap
You should also consider setting up a dedicated image sitemap. This allows you to pass image-specific details to search engines, helping your visuals show up more effectively in image search results. An image sitemap should always include the image URL (mandatory), along with its title and caption.
Here is a screenshot of an example image sitemap:

Example of an image sitemap
Video XML Sitemap
For videos embedded on your website, creating a video sitemap is a great way to send specific video details to search engines. At a minimum, a video sitemap should include the URL of the page where the video is embedded, the video's title and description, and the direct video URL or YouTube link.

Example of a video sitemap
You can find more information about video sitemaps here.
Submitting multiple sitemaps to Google Search Console is completely fine. In fact, creating separate URL, image, and video sitemaps for each of your main categories is highly recommended. It makes troubleshooting much easier if some of your URLs, images, or videos aren't getting indexed by Google.
Sitemap Generators – Multiple Ways to Build Your Sitemap
Many Content Management Systems offer plugins that automatically generate and regularly update sitemaps. For WordPress, the Yoast SEO plugin is a popular choice. There is also a Yoast extension for TYPO3 that takes care of a lot of the heavy lifting.
Additionally, plenty of online sitemap generators can build various sitemaps for you. For instance, the Screaming Frog SEO Spider has a built-in sitemap generator.

Generating sitemaps with Screaming Frog
Screaming Frog lets you customize your export settings—for example, you can choose to exclude the "Last Modified" attribute if needed. The downside with desktop tools is that updates must be done manually. However, there are also sitemap generators that support automated updates, though these aren't always free.
Adding Your Sitemap to robots.txt and Google Search Console
It's important to reference your sitemap index in your robots.txt file. The robots.txt file provides instructions to search engine crawlers. By including the path to your .xml file, crawlers can locate and process your sitemap much faster.
Example of an entry in robots.txt:
User-agent: *Sitemap: https://www.example-url.com/sitemap-index.xml
Using a sitemap index is primarily about keeping track of your indexed pages, videos, and images. That's why submitting your sitemap to Google Search Console is a must. Over time, you'll be able to see how many pages were submitted (i.e., listed in the sitemap) and how many of them have actually made it into Google's index.
The updated Google Search Console makes it easy to see which submitted URLs have been indexed by Google and which haven't. This gives you detailed insight to plan your next optimization steps.

Sitemap overview in Google Search Console
A Few Quick Facts About Sitemaps:
According to Google's official guidelines, a sitemap can be up to 50 MB (or 50,000 URLs). Downloading a file that large can take some time. While Google is strict about page load speeds as a ranking factor, the download time of an XML sitemap won't affect rankings—as long as it doesn't time out.
In an image sitemap, you shouldn't list more than 1,000 images per URL.
Always ensure your sitemaps update automatically. Most popular CMS platforms offer plugins or extensions that generate sitemaps and keep them up to date daily.
Google recommends keeping the file names of your index sitemap and sub-sitemaps consistent over time.
Conclusion
When you create, integrate, and submit your XML sitemap correctly in Google Search Console, you're showing Google which pages you consider high-quality and worthy of indexing. XML sitemaps aren't a magic wand that guarantees instant indexing, but they provide Googlebot with vital cues that greatly improve your chances.
How can we help?
Looking to set up a sitemap on your website? Have questions about configuring or building one properly? We'd be happy to help you create the perfect sitemap. Feel free to reach out to us anytime!

Nadine
Wolff
As a long-time expert in SEO (and web analytics), Nadine Wolff has been working with internetwarriors since 2015. She leads the SEO & Web Analytics team and is passionate about all the (sometimes quirky) innovations from Google and the other major search engines. In the SEO field, Nadine has published articles in Website Boosting and looks forward to professional workshops and sustainable organic exchanges.
