XML Sitemap defined: A “cheatsheet” for search engines to see all of the 200 OK URLs that you want to have in their indexes for your domain.
This file gives search engines access into every single URL you want to have ranked for your domain in a way that doesn’t make search engines rely on their spiders or crawlers find them all.
An XML sitemap file is almost always present at the root of a domain (e.g. example.com/sitemap.xml).
XML Sitemap Use Cases
You should always have an updated XML sitemap readily accessible for search engines to grab. However, there are circumstances where you need to pay some extra attention to this all-important file:
- Site migration – If you’re changing URL structures, when these changes are pushed live you should have your XML sitemap file reflect the new URLs.
- News – If you’re generating news at a fairly frequent clip, you should ensure your XML sitemap updates with these new URLs. Also look into a Google News XML sitemap.
- International – Each international “version” of your site, whether it’s on a subdomain or a subfolder, should have its own XML sitemap file.
Special Considerations for XML Sitemaps
The following are some things you should keep in mind when thinking about creating an XML sitemap:
- One XML sitemap per domain. This means if you have a subdomain (subdomain.example.com), you would need to create an XML sitemap for that subdomain only and place it at the root (subdomain.example.com/sitemap.xml).
- URL limitations. If you have more than 50,000 URLs, you need to create separate XML sitemaps. In this case, you would create a parent XML sitemap file (sitemap-index.xml) and then have this file link off to each sitemap XML file (sitemap1.xml, sitemap2.xml). This content is more for site owners who have a website with less than 50,000 URLs. If you do, you can consult the XML sitemap website with instructions on this practice here.
- International. If you have International content, such as a version of your site on a subfolder level (example.com/es/), you would want to create an XML sitemap for this “section” of the site and place it at that subfolder level (example.com/es/sitemap.xml).
XML Sitemap Example
These files are always constructed in the same way, a protocol that all search engines agree and follow.
So an example of two URLs in a sitemap file would look something like this:
You add the top lines to show this is an XML sitemap example and you add the trailing slash urlset to signify the end of the file.
XML Sitemap SEO Importance
Like previously mentioned, XML sitemaps are cheatsheets for search engines. You can easily tell them to go out and crawl the listed URLs without having to rely on their spiders to find them all.
This can be both a blessing and a curse, whether your XML sitemap is up to date 🙂
We find that there is still some SEO value in having an up-to-date, maintained XML sitemap. While search engines (and their spiders) are getting smarter at finding all of the content for a domain and being able to crawl all types of content, why not give them a list of your URLs?
How To Generate an XML Sitemap File – WordPress
If you’re using the WordPress platform, a whole slew of plugins give you the ability to create an XML sitemap for your website.
Perhaps the most popular way is by using the Yoast plugin. This plugin will also update your XML sitemap whenever any new content is posted on your site – automagically.
How To Generate an XML Sitemap File – Other Platforms (Static, Wix, etc.)
Never fear! If you’re using a CMS other than WordPress, there are still ways you can create and maintain an XML sitemap.
Our most-trusted tool is XML-Sitemaps. This online tool will crawl and grab all of your URLs and automatically generate an XML sitemap. The limitation here is that the free version will only crawl up to 500 URLs.
You can also use other tools to create XML sitemaps, such as Screaming Frog SEO Spider.