What are XML sitemaps?
What websites need an XML sitemap?
Google’s documentation says sitemaps are beneficial for “really large websites,” for “websites with large archives,” for “new websites with just a few external links to it,” and for “websites which use rich media content.”
While we agree that these kinds of websites will definitely benefit the most from having one, at Yoast, we think XML sitemaps are beneficial for every website. Every single website needs Google to be able to find the most important pages easily and to know when they’re last updated. That’s why this feature is included in the Yoast SEO plugin.
Which pages should be in your XML sitemap?
How do you decide which pages to include in your XML sitemap? Always start by thinking of the relevance of a URL: when a visitor lands on a particular URL, is it a good result? Do you want visitors to land on that URL? If not, it probably shouldn’t be in it. However, if you really don’t want that URL to show up in the search results, you’ll need to add a ‘noindex’ tag. Leaving it out of your sitemap doesn’t mean Google won’t index the URL. If Google can find it by following links, Google can index the URL.
Example 1: A new blog
Say, for example, you are starting a new blog. You will want Google to find recent posts quickly to make sure your target audience can find your blog in the search results, so it’s a good idea to create an XML sitemap right from the start. You might make a handful of first posts and categories for them as well as some tags to start with. But there won’t be enough content yet to fill the tag overview pages, making them “thin content” that’s not valuable to visitors – yet. In this case, you should leave the tag’s URLs out of the sitemap for now. Set the tag pages to ‘noindex, follow’ because you don’t want people to find them in search results.
Example 2: Media and images
The ‘media’ or ‘image’ XML sitemap is also unnecessary for most websites. This is because your images are probably used within your pages and posts, so they will already be included in your ‘post’ or ‘page’ sitemap. So having a separate ‘media’ or ‘image’ sitemap would be pointless, and we recommend leaving it out. The only exception to this is if images are your main business. Photographers, for example, will probably want to show a separate ‘media’ or ‘image’ sitemap to Google.
How to make Google find your sitemap
If you want Google to find your XML sitemap quicker, you’ll need to add it to your Google Search Console account. In the ‘Sitemaps’ section, you’ll immediately see if your XML sitemap is already added. If not, you can add your sitemap at the top of the page.
Adding your sitemap helps to check whether Google indexed all pages in your sitemap. If there is a big difference in the ‘submitted’ and ‘indexed’ number on a particular sitemap, we recommend looking into this further. There could be an error preventing some pages from being indexed. Another option is, that you may need more links pointing to the content that’s not been indexed yet.