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
https://www.dayaweb.com/
About
https://www.dayaweb.com/testimonials/
XML – a list of website URLs in XML format
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.dayaweb.com</loc>
    <lastmod>2018-11-06</lastmod>
    <changefreq>monthly</changefreq>
    <priority>1</priority>
  </url>
  <url>
    <loc>https://www.dayaweb.com/about/</loc>
    <lastmod>2018-02-08</lastmod>
    <changefreq>monthly</changefreq>
    <priority>1</priority>
  </url>
  <url>
    <loc>https://www.dayaweb.com/testimonials/</loc>
    <lastmod>2018-02-02</lastmod>
    <changefreq>monthly</changefreq>
    <priority>1</priority>
  </url>
</urlset>

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

XML-Sitemaps.com

If you have a small website (less than 500 pages), then you can use an online tool like XML-Sitemaps.com. 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.

XML-Sitemaps.com

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

Yoast

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:

robots.txt
Sitemap: https://www.dayaweb.com/sitemap.xml

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:

Conclusion

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.

CONTACT US TO CREATE A SITEMAP

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