The What, Why, and How of XML Sitemaps

The What, Why, and How of XML Sitemaps

The What, Why, and How of XML Sitemaps

As you properly optimize your website, you could focus on many technical aspects. You could make sure that your website is optimized for mobile devices, has a good text/HTML ratio, loads quickly, and uses the most up-to-date coding. However, none of these issues matter unless your website and its pages are found and indexed by search engines.

Read on to find out what to implement and how to make the indexing process easier!

What Is an XML Sitemap?

A sitemap lists the pages of a website, organized by importance, so search engines know which URLs to crawl and index.

XML stands for Extensible Markup Language. XML is a file extension or language that is the most commonly used format when implementing a sitemap onto a website.

Why Do I Need a Sitemap?

The Internet currently has over 30 trillion webpages available to readers. Google crawls all of these pages and attempts to give users the best results to their search queries. Because there are so many pages online, it is important to make this indexing process as easy as possible for search engines like Google.

A sitemap is the most efficient way to help Google find your specific website and pages out of the trillions of pages they crawl.

How Do I Create a Sitemap?

Before you create a sitemap, you need to decide which type works best for your website. You can either create a static sitemap or a dynamic sitemap.

Static sitemaps are manually edited and changed by the webmaster. Any time someone adds or removes pages on the website, the webmaster needs to make the change on the sitemap. If someone adds a page to the website and the webmaster does not add the page to the sitemap, Google can take longer to find and index the page. Use a static sitemap if your website is all coding and does not have an editing platform, or if you want greater control over the pages on your sitemap.

Dynamic sitemaps automatically change when you remove or add a page. You can make a dynamic sitemap for your website using one of several plug-ins. Many small and mid-size business owners like this type of sitemap because it requires less maintenance and saves time. If you choose to use a dynamic sitemap, you don’t have to worry about all the technical details because the platform will take care of them for you.

Sitemap pluginSetting Up a Dynamic Sitemap

  1. Generate a list of URLs using a plug-in. Each CMS has a different place to search for and download plug-ins. For example, on WordPress, you can find a plug-in tab within the side panel. You may want to download the popular SEO plug-in Yoast, which contains an XML sitemap feature. Many free SEO plug-ins also generate dynamic sitemaps. Read reviews and look over prices when selecting a plug-in to use.
  2. Verify that the URLs in the sitemap are the pages you want to index.
  3. Use Search Console to double-check that you created your sitemap correctly. With a dynamic sitemap, you do not need to upload files to your website’s root directory. Simply activate your chosen plug-in, and the sitemap changes to reflect any page changes within your website.

Setting Up a Static Sitemap

  1. Generate a list of active URLs on your website. If your website is under 500 pages, you can use https://www.xml-sitemaps.com/. Once generated, you can download the sitemap in .xml, .html, or .txt formats.
  2. Make sure the URLs in the sitemap are the pages you want to index. Use Google’s Search Console tool to verify the sitemap was created correctly.
  3. Upload the sitemap to your website’s root directory. Each content management system (CMS), the place where you make edits to your website, is different. This video explains the process of creating and uploading a sitemap. If this seems too complicated or you are unable to find the root directory for your website, consider using a plug-in and creating a dynamic sitemap instead.

If you use a static sitemap, read over the next three sections as well to create the proper structure for your sitemap and add the right elements.

Creating the Proper Structure

It’s important to use the proper structure for a sitemap and to implement the correct kind of sitemap. The typical location for a sitemap on a website is /sitemap.xml. As a full URL on a website, the sitemap will look like this: http://www.boostability.com/sitemap.xml.

To make it easy for Google to find your sitemap, include it in your robots.txt file. For example, look at a screenshot of a robots.txt file for Boostability.com:

Adding Required Elements

When creating a basic sitemap, you need to include the following elements:

<urlset> Sitemaps open and close with this tag to let the search engines know where the sitemap starts and ends.

<url> Use this tag to input a URL.

<loc> Use this tag to input active URLs you want search engines to find and index.

Consider These Optional Elements

You could also include these additional elements to provide more information for search engines:

<lastmod> This tag lists the date that someone last modified the sitemap.

<changefreq> This tag lets the search engines know how often the content is changed and how frequently the page should be indexed. (Note: if the search engines index the page several times without changes, they will come back less often.)

<priority> This tag defines the importance of an individual page relative to the rest of the website.

<xhtml:link Use this tag to list URLs with content in different languages.

With all of these elements, your sitemap will look something like this:

Sitemap example

Creating Sitemaps for Different Media Type Extensions

Most small businesses do not need sitemaps for their video, image, and news content, but you can create a sitemap listing these items if you wish. For more information on additional sitemap media types and implementation, visit Search Console Help.

Submitting to Search Console

Make sure to submit your sitemap to Search Console. Google provides this valuable resource to help website owners better understand how Google views a website.

 

A sitemap is an important part of a properly optimized website. Decide what kind of sitemap you want to use on your website, verify your sitemap, and upload it to both your website and Google Search Console. Follow these procedures, and you are one step closer to navigating the complicated waters of SEO.

Drew Whitmill
[email protected]

Drew Whitmill works as an account strategist at Boostability where he helps strategize and improve performance, processes, and products. He graduated from BYU with a degree in Advertising and minored in Anthropology and Business. He lives in the middle of nowhere and commutes around a mountain to get to work. In his free time, Drew loves any and every kind of sport from basketball to badminton and everything in between. He super unofficially holds the world record for staring without blinking.