XML Sitemaps 101

SMS Text

We all know how important XML sitemaps are in helping the search engines index our websites better, but it is quite surprising how many webmasters fail to implement it this simple, crucial component of site optimization.

XML sitemaps are crucial

XML Sitemap Basics

To get the best of an XML sitemap, you first need to fully understand what it is. Basically, the sitemap is a text file containing a detailed map of all URLs present on your website. This helps search engine bots to index all of your website’s pages. The sitemap also contains META data, which helps the search engine crawlers to understand when a file has changed or when you have added new content.

XML Sitemap – Supported Files

The different search engines use the XML sitemaps different from one another. Google currently allows you to include the following types of content in your sitemap:

  • HTML Web Pages
  • Videos
  • Images
  • Mobile
  • News

If you target other search engines, you can refer to their guidelines regarding sitemap usage.

What are the limits of XML sitemap?

Each XML sitemap currently supports adding up to 50 000 URLs and can’t exceed size of 10MB. If you have more URLs to add to your XML sitemap, you can either divide your website into sections and created separated sitemap for each or implement gzip compression.

How to Create XML Sitemap?

Based on the system you use to manage your website, you have multiple options for generating an XML sitemap. To make things even clearer, I decided to separate automated sitemap creation from manual, so you can get better overview.

Automation thumbnail. Automated Sitemap Creation

If you are not using any of the popular content management systems, you can download desktop software and use it for that purpose. Very good choices are XENU Link Sleuth and MS SEO Toolkit. Both are free for use.  Another good choice is the G Site Crawler. All those tools will allow you to generate large lists with all URLs on your website and easily get it exported in XML format.

If you use WordPress, my recommendation is WordPress SEO by Yoast. It is really simple plugin, which allows you to automatically generate sitemaps for your different content types.

Manual setupManual Sitemap Creation

If you have to do the sitemap manually, you need to follow the exact structure of the XML sitemap code, which is as follows:

<?xml version=”1.0″ encoding=”UTF-8″?>
<urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>

For more information about sitemap code, visit the official pages in the search engines.

Submitting Your Sitemap

Once your XML sitemap is ready, you should submit it to the targeted search engine. Since, I very often target Google, the example is for this search engine only.

Google allows sitemap submission via its Webmaster Tools. You need to navigation to Optimization->Sitemaps and there you will find flashy red button allowing you to submit your sitemap. The resulting submissions will end up rendering something like the screenshot below. If you make any changes to the sitemap afterwards, you revisit the page and add it again.

A Google Webmaster sitemaps screen

Photo credit: Website code image – courtesy © kim75 – Fotolia.com

Lyuben Georgiev
Lyuben Georgiev currently works as a SEO manager in a premium Bulgarian SEO agency - SEO PAL. His most favorite topics are onsite SEO and link building. Beside his job, Lyuben is dedicated to his hobbies, which include driving and traveling.
Get the latest news from Search Engine Journal!
We value your privacy! See our policy here.
  • http://www.titanweb.com Bob Jones

    Giving each section or category of your website their own sitemap regardless if it is needed due to size limitations, is a good practice. It can help you analyze site performance easier by breaking things down and pinpointing potential weak pages and content.

  • http://www.pinpointlocal.com Gabby Horner

    Thanks for the great article! Personally, I prefer to use an Automatic Generator, and then go back and adjust the code if needed. Looking forward to checking out some of the Auto Generators you suggested!

  • http://www.ericmobley.net Eric

    What do you think about the optional attributes? lastmod, changefreq, etc

    My opinion: Just get the xml sitemap up and submit it. Don’t worry too much about these optional attributes. If you can easily implement them using your CMS that’s fine, go ahead. Spending too much time tweaking the optional attributes for each page is not time well spent, IMO.

  • Dave

    I put together (based on the modification of a few scripts I found) a video XML sitemap generator for everyone cause there wasn’t a web based generator anywhere.

    And great article Lyuben, there aren’t that many people who understand the benefits of XML files.