How to Generate an XML Sitemap

28.02.2017 Blog

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.

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:

  1. 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.
  2. 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. 
  3. 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:

  1. One XML sitemap per domain. This means if you have a subdomain (, you would need to create an XML sitemap for that subdomain only and place it at the root (
  2. 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 burnell & bradgon real estate.
  3. International. If you have International content, such as a version of your site on a subfolder level (, you would want to create an XML sitemap for this “section” of the site and place it at that subfolder level (

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.