How to Create an XML Sitemap for Your Site

Trust us, you can do this

If you run a website of any kind, you should probably have an XML sitemap. It willhelp your search engine optimization(SEO). But you might be wondering what an XML sitemap is, and even if you knew, how would you create an XML sitemap?

The good news is that creating an XML sitemap is easier than understanding exactly what it is. And understanding XML sitemaps is fairly simple too. You can do this.

What Is An XML Sitemap?

Let’s cover the XML part first. XML stands for eXtensibleMarkupLanguage. It’s not exactly a programming language. It’s a flexible way to tell web browsers and other programs about the data an XML document carries.

For example, we could tell someone we live at 123 Main Street and they’d understand. But programs don’t.

XML tags placed on either side of the address data will help tell the program what the data means. Tags are always in pairs with one opening tagand one closing tag.

So we could use XML tags to tell programs what that data means. It might look like:

For a program that recognizes those tags, it will know that’s a full street address. Then the program can use that information to do something useful.

The extensible part means those tags could be anything! If the program understood the tag to mean street number, it would still work. So a developer could use just about anything to define the data between the XML tags.

On to the sitemap. It’s pretty much what it sounds like. It’s a map of where to find different types of information on our website.

Search engines, like Google, want specific information so they know how to categorize and rank our site. The XML sitemap can provide that information.

This is an example of an XML sitemap for a single web page.

Here’s what those tags mean:

This one tells the search engine that the XML version we’re using is 1.0 and the text is encoded in UTF-8. That’s the encoding specification that the sitemap must be in.

This tells the search engine what sitemap standard is being used in our sitemap. Remember, our XML has to be using the same tags as the program that has to read it for it to understand it.

This tells the search engine the information about a Uniform Resource Locator (URL) will be following. A URL is also known as a web address or link.

This defines the data in the tag as being the actual location, or specific URL of the page to be indexed.

This one tells the search engine when that page was last modified.

This lets the search engine know the change frequency of that page. Acceptable values are always hourly, daily, weekly, monthly, yearly, never.

This tells the search engine how important we think this page is compared to other pages in our sitemap. Acceptable values range from 0 to 1, with 1 being the highest and 0.5 being average.

Note that these aren’tcommands for the search engine. They’re going to read that information and process it however they want.

Why Create An XML Sitemap?

A well-made XML sitemap will help give us the best chance of getting our site in front of the people we want to see it. It will tell the search engine what kind of information we’re providing it, where to access the information, and when the information was last updated.

As it’s a map, it doesn’t have to be an exact representation of the landscape. We get to choose what goes in it, so the search engines get the right pages. For example, ourPrivacy PolicyandAcceptable Usepages aren’t going to be very different from any other site on the web. Instead of mapping those, map the pages that get the user to the good stuff, like our best blog posts or product pages.

For the blog posts, we may want a sitemap that lists all your posts but gives a higher priority to more recent ones. That shows the customer, and the search engine, that our site is fresh.

Do we need to create a sitemap for the images? Pictures are important. The visual is the first thing that reaches the customer’s desires. But each page is already going to have the pictures on them, and those will get indexed. So having a sitemap just of images isn’t that important.

Now we’re presenting the essence of our site to the search engines. They don’t need to waste time crawling and indexing large necessary, but not as important, parts of our site.

With a good sitemap, we’re cooperating with the search engines and that will help our site get the best ranking it deserves.

How Do I Create an XML Sitemap?

Fortunately, there are several automated tools to help us do this. If we’reusing WordPress, get the Yoast SEO plugin. It’s a great search engine optimization tool and creating a sitemap for us is just one of its features. Take the time to reallylearn how to use the Yoast SEO pluginfor all its features.

That’s the quickest way to create an XML sitemap in WordPress with the Yoast SEO plugin. Take a look around in the plugin for ways to hone the sitemap and make it exactly as needed.

If we’re not using WordPress for our site, we can use a variety of online and offline tools.

Possibly themost used desktop SEO programisScreaming Frog SEO Spider. There’s a free and a paid version. For creating an XML sitemap, the free version is all we’ll need.

Once it is saved, upload thesitemap.xmlfile to the root of the website. Now we can register the sitemap with Google and other search engines.

How Do I Get Google To See My Sitemap?

We say search engines, but really the only one most are worried about is Google. So how do we get Google to see our sitemap?

We’re hoping that it’s helpful in getting our site ranked higher, but it will only help if Google knows it is there. We’ll need to use theGoogle Search Console.

Guy has been published online and in print newspapers, nominated for writing awards, and cited in scholarly papers due to his ability to speak tech to anyone, but still prefers analog watches.Read Guy’s Full Bio

Welcome to Help Desk Geek- a blog full of tech tips from trusted tech experts. We have thousands of articles and guides to help you troubleshoot any issue. Our articles have been read over 150 million times since we launched in 2008.

HomeAbout UsEditorial StandardsContact UsTerms of Use

Copyright © 2008-2024 Help Desk Geek.com, LLC All Rights Reserved