How To Create A Sitemap

David Ugale, Author
Written by David Ugale

What Is A Sitemap?

Sitemaps are files that list the URLs that belong to your website. Their primary usage is to notify search engines about all of the web pages that you wish to have crawled and indexed on your website. Sitemap files are submitted to search engines so that they can crawl and discover your website pages faster.

What Does A Sitemap Look Like?

There are a few different formats for sitemap files, but the two most common formats are Text and XML:

Text – a list of website URLs, each on a single line
XML – a list of website URLs in XML format
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="">

One big advantage to XML Sitemap files is that you can provide additional information about your website pages, including:

  • Date of last update
  • Frequency of updates
  • Relative importance (priority) of the page

Creating A Sitemap

There are many different ways that you can use to make a sitemap file. The way that you decide to use will probably depend on a few different factors:

  • The size of your website (i.e. number of pages)
  • Your website platform (custom, WordPress, etc.)
  • The technical skill that you have available

Among the many options available to you are:

  • Online tools (Sitemap Generators)
  • Desktop applications
  • WordPress plugins
  • Manually creating one using a text editor

Whichever method you use, remember to visually inspect the generated sitemap file to make sure that it includes all of the URLs that you want included. Additionally, you may want to exclude certain URLs that you don’t want to be indexed by search engines.

Finally, make sure that you follow the general sitemap guidelines.

Note: sitemaps can only have up to 50,000 URLs or be 50MB in size (uncompressed). If you have a very large website, then you will need to break up your sitemap into two or more files and use a sitemap index.

Online Tools

If you have a small website (less than 500 pages), then you can use an online tool like Simply enter in your main website URL and the tool will crawl your website and generate an XML-formatted sitemap file that you can download.

Desktop Applications

Screaming Frog SEO Spider

Screaming Frog SEO Spider is a desktop application that will crawl your website and generate a sitemap file. It is free for websites under 500 pages.

Screaming Frog SEO Spider

WordPress Plugins


The Yoast SEO plugin for WordPress will automatically produce an XML sitemap that will include all of the pages on your site.

An XML Sitemap file created using the Yoast WordPress plugin

Manually Creating A Sitemap File

If you have a small website, you might be able to manually create a sitemap file on your computer. Sitemap files must be UTF-8 encoded, so you will need to use a plain text editor:

  • Windows – Notepad
  • Mac – TextEdit

Depending on the format that you choose, you would either save the sitemap file with a .txt or .xml extension.

Upload Your Sitemap File

Completed sitemap files are usually uploaded to your website’s document root. Once the sitemap file has been uploaded, you should also add the sitemap URL to your robots.txt file:


Even if you are planning on submitting your sitemap to Google Search Console and Bing WebMaster Tools, adding the sitemap URL to your robots.txt file will help other search engines find it.

Validate Your Sitemap File

The W3C Markup Validation Service

Once you’ve created your sitemap file, you should validate it using a validation service such as the W3C Markup Validation Service.

The W3C Markup Validation Service

Submit Your Sitemap

Once your sitemap is complete and uploaded to your website, you can then submit it to search engines like Google and Bing:


Once you understand the format of sitemap files and all of the tools available to you, it shouldn’t be too much of a challenge to create a proper sitemap file for your website. However, it’s important to make sure that you keep your sitemap file updated as your website changes.


Originally published January 13th, 2019, updated November 4th, 2022