How Do I Make an XML Sitemap?

What is an XML Sitemap Anyway?

An XML sitemap is a small file with lines of simple XML machine readable code that list the HTML files, the image files, and the audio and video files that are part of a Web site.  Google uses it to easily see what pages and other files make up your Web site and how they are organized so it can crawl your site more efficiently.  Every site should have an XML sitemap to help the search engine bots to know what files to find, crawl, and index on the site.  Of course, the XML sitemap must be updated when the site has pages added or deleted from it as well.

Two entries from the XML Sitemap for our Web site

This image shows two entries from the XML Sitemap for our Web site

Without making your eyes glass over from looking at raw code, just notice a couple things about this brief snippet.  First, there are two entries; each begins with <url> and ends with </url>.  Second, each of those entries has two pieces of information; first the URL of an HTML page of our site (inside the <loc> and </loc> tags), and second the last modified date & time of that HTML file (inside the <lastmod> and </lastmod tags).  Pretty simple, yes?

The entire file has a header with other information in it, and can have separate sections for each of the various file types listed; HTML, image, video, etc.  We have spared you that complexity here since we just want to give you an introduction.

A couple of items of note about these entries:  We must be very specific in how the location and date/time information is specified.  Getting these wrong can cause the XML sitemap file to not work properly.

So, How Do We Make an XML Sitemap?

You could hand code it in a plain text editor, however, unless you are used to doing this it is not recommended.  There are also some free tools that will crawl your site and create one for you.  Google actually has a great resource listing showing a variety of tools available to do just that.  We have used both online tools and desktop utilities to generate these files for us.  If you have a completely WordPress site, then there are WordPress plugins available to generate the XML sitemaps for you.  If your site is a combination of  static HTML pages and a WordPress blog, then one of the  online tools is probably the better solution.

Once you have a created or modified your XML site file you should test it using the testing tool that is available on your Google Search Console account.  BTW, Google Search Console was also known as Google Webmaster Tools until earlier this year sometime.  If you don’t have an account for your site, that is another “must have”.  It’s free, and you can use it to test your XML sitemap, then submit it to Google once testing shows that it’s correct.

The XML sitemap should be located in the “Web root” of your Web server file structure.  That is where your home page is located.

If you need help creating or updating an XML sitemap, or testing it, please feel free to contact us and we’ll be happy to assist with that and all your needs for maintaining an effective Web presence for your business or organization.

Categories: SEO, Web Site Development
Warning: count(): Parameter must be an array or an object that implements Countable in /users/the-networks.com/htdocs/blog/wp-includes/class-wp-comment-query.php on line 405
| Comments

Warning: count(): Parameter must be an array or an object that implements Countable in /users/the-networks.com/htdocs/blog/wp-includes/class-wp-comment-query.php on line 405

Leave a Reply

Your email address will not be published. Required fields are marked *