Victorious SEO Logo

Sitemap Examples: XML Best Practices To Optimize for SEO & Google

Make it easier for Google to find your pages — include a sitemap on your website to showcase how your pages relate to each other. Explore a sitemap example, learn how to create sitemap files, and discover sitemap best practices below!

Dec 13, 2023

5 m read

If you bring up sitemaps with a group of SEOs, you might hear a lot of different opinions about whether you need one. Some SEOs will tell you Google is smart enough to uncover your underlying site structure and doesn’t need XML sitemap files to understand how to crawl your site. Others will insist it’s a crucial part of technical SEO.

In fact, Google itself says most websites will benefit from having a sitemap and that it “can improve the crawling of larger or more complex sites, or more specialized files.”

Ultimately, a sitemap makes it easier for Google and other search engines to crawl and index your site, increasing your chances of showing up in search results. Even if Google can discover your web pages on its own, why not make Googlebots’ job easier, maximize your crawl budget, and make sure Google finds the pages you want it to?

In this article, I’ll explain what XML and HTML sitemaps are and why you should use them. I’ll also analyze a sample XML sitemap so you can see precisely what it is and share sitemap best practices that you can implement right now.

blog form image 1 1

SEO Checklist & Planning Tools

Are you ready to move the needle on your SEO? Get the interactive checklist and planning tools & get started!

What Is an XML Sitemap?  

An XML sitemap is a text file containing the indexable URLs on your website. It’s presented in Extensible Markup Language, more commonly known as XML. The XML format is web-friendly and easy for web crawlers to read.  

Why Does My Website Need an XML Sitemap?

The primary function of a sitemap is to help search engines find relevant pages on your website and index them. They also help crawl bots understand how your site is structured

While including pages on an XML sitemap doesn’t guarantee Google will index them, it does make it easier for Googlebot to find and crawl them. If you have an extremely large website or don’t have an internal linking strategy in place, your XML sitemap makes all of your pages discoverable — including orphaned pages that aren’t linked to from other pages on your site.

Now that you understand why having a sitemap is important, let’s look at three sample sitemaps you can include on your website.

XML Sitemap Example

Let’s analyze an XML sitemap example to see what it looks like in real life. 

Here’s a typical sitemap.xml example from our site:

https://victorious.com/page-sitemap1.xml

It’s for our WordPress site and was dynamically generated.

Here’s what an example XML Sitemap looks like:

xml sitemap example screenshot

Not all XML sitemaps look like this sample sitemap. Our sitemap is formatted to be readable by humans, but sometimes, an XML sitemap looks like raw HTML. After all, the primary purpose of XML sitemaps is not to be read by users but to help search engines understand what your site is about.

Here’s another dynamic sitemap.xml example for the Victorious site:

https://victorious.com/sitemaps.xml

example sitemap xml for index showing different xml sitemaps associated with victorious.com

This is a particular type of sitemap called a sitemap index. It houses links to multiple sitemaps for our website. Clicking on https://victorious.com/resource-sitemap1.xml will lead you to our blog sitemap, while the other links will take you to other subdirectories.

HTML Sitemap Example

Another Google sitemap example is an HTML sitemap, also known as a visual sitemap. Just like in the sample XML sitemap, an HTML sitemap lists out all the pages you want to be indexed. 

HTML sitemaps are multipurpose. They’re usually made to look just like a regular page on your site and include a navigation menu, footer, and everything else you might expect to see on a page. While they’re more user-friendly than XML sitemaps and are designed to be read by humans, they’re still beneficial for search engine robots.

If you want to see an HTML sitemap example, check out ours:

https://victorious.com/site-map/

HTML sitemap example

If you have a WordPress site, you can use a plugin to create an HTML sitemap.

Sitemap Best Practices

Now that I’ve shared a couple of sitemap examples, let’s go over the best practices you should follow when creating a sitemap. These best practices apply to both XML and HTML sitemaps.

1. Use a Dynamic Sitemap

Having an automatically generated sitemap is crucial for large websites. Whenever you add, update, or remove a page, your dynamic sitemap will automatically update. 

2. List All Your Important Pages

Make sure your sitemaps contain all the pages you want to be indexed. Otherwise, you may find that your newer pages aren’t indexed as quickly. 

3. Make Your Sitemap Accessible

Your sitemap should be located exactly where Google expects to find it. If search engines get a 404 error when trying to access your sitemap, it may take them longer to index your site and understand your website’s structure. 

4. Exclude Noindex URLs from Your Sitemap

Sitemaps help your visitors and search engines properly navigate and crawl your website. Adding noindex pages to your sitemap will confuse search engines and may negatively impact your crawl budget.

I generally recommend excluding archive pages from your XML sitemap and to noindex them as well (ex. blog category pages, tag pages, author pages, date archive pages, etc.). Only canonical pages need to be included in your sitemap.

5. Don’t Include Redirects

Your XML files should only include published URLs. If you delete a URL or use a 301 redirect, make sure to remove that URL from your XML sitemap file. A dynamically generated sitemap will automatically do this for you.

6. Include Your Sitemap in Your Robots.txt

It’s also best practice to keep your XML sitemap in your site’s robots.txt file. Your robots.txt file details which directories search crawlers should and shouldn’t index. Providing your XML sitemap in the same file makes it clear you want Google and other search engines to access it and index those pages.

7. Check Your Index Coverage in Google Search Console

If you have a well-maintained sitemap, you can double-check that Google’s indexing the number of pages you expect. 

Go to ‘Coverage’ on the left sidebar of Google Search Console to see which pages are indexed and which are excluded.

index coverage report

8. Perform Regular Sitemap Maintenance

Check your XML sitemap regularly and update it as needed. Make sure there are no errors that could prevent search engine crawlers from accessing it.

9. Upload Your Sitemap to Google Search Console

If you make significant changes to your sitemap, upload your new sitemap to Google Search Console.

How To Create a Sitemap

If you want to create a sitemap from scratch, use a text editor like Notepad that lets you save your document as an XML file. You’ll need to use sitemap protocol schema, which you can find at Sitemaps.org

This can be a time-consuming process — especially if you have a large website. Plus, you’ll need to manually update your sitemap whenever you add new pages. 

Rather than using a sitemap template or creating one from scratch, use a tool like Yoast that creates and updates a dynamic sitemap. This way, you reduce the possibility of errors and can more easily maintain your sitemaps.  

Once you have your website sitemap, submit the URL to Google Search Console. While Google will eventually find it on its own, submitting it through GSC expedites the discovery process.

Get the Inside Scoop Into How We Do SEO

An XML sitemap is just one component of good SEO. Download our SEO Checklist to learn how we help our customers drive meaningful organic traffic that converts to bottom-line results.

In This Article

Recommended Reading

10 m read
Blog

Need to delete a page? Plan to redirect traffic from that URL to another to avoid a 404 error. Learn why redirects are valuable for SEO and how you should use them below.

24 m read
Blog

Search engines have hundreds of ranking factors — so where do you begin when trying to get on page one? This easy-to-use SEO checklist with free downloadables makes starting and improving your search engine optimization a breeze.

7 m read
Blog

Noindexing a page helps you reduce index bloat and maximize your crawl budget. But telling Google not to index a page sounds antithetical to getting your pages on page one of search results. Learn why these two ends aren’t at...