XML Sitemaps and SEO: Everything You Need to Know

Last Updated on November 6, 2026 by Leave a Comment

XML Sitemaps and SEO: Everything You Need to Know
Blog / WordPress / XML Sitemaps and SEO: Everything You Need to Know

Every website owner should understand the ins and outs of sitemaps. A sitemap tells search engines what exists on your site so that they can show up in search results, and an HTML sitemap helps visitors find their way around once they reach a page. Here’s everything you need to know about sitemap SEO.

What Is An XML Sitemap?

An XML sitemap is a list of the most important pages on a website. Search engines use sitemaps to find and crawl website pages, then add them to search results. A single sitemap can have up to 50,000 URLs and a file size of up to 50MB uncompressed, but some tools set lower limits for the sake of speed. WordPress’s built-in sitemaps hold 2,000 URLs each, and Yoast holds 1,000.

If you go over one of these limits, you can create another sitemap and split the URLs between the two, and you can do this more times if needed. The sitemaps are then combined into one XML sitemap index file for search engines. If you have a ton of blog posts, products, or landing pages, for example, you may need multiple sitemaps in one main file.

That’s not a bad thing. It just means that your site is large enough to need a directory or reference guide for its structure.

What Does A Sitemap Do?

Search engines shouldn’t crawl each and every page of your site. There are some pages that you don’t want to show up in search results, like a “thank you” page that a user will only see after submitting a form. But what about those pages that you do want to be searchable…but that aren’t (yet)?

Think of a sitemap as a roadmap for your website. When some pages that you want to be found are invisible (because there aren’t any internal links pointing to them, making them “orphaned”), a sitemap tells search engines that they exist. In other words, search engines use your sitemap to locate all of your website’s important pages, whether or not you have a complete internal linking structure.

A sitemap can also have a date and time stamp, called lastmod, next to each URL. This tells the search engine when the page was last updated, and Google uses the value when it is consistently accurate. If a date in the sitemap changes, search engines know it’s time to crawl the content again. Google ignores the optional priority and change frequency tags, so you can skip them.

A Yoast SEO sitemap index with a Last Modified date beside each sitemap

What Is Sitemap SEO?

A sitemap gives search engines another way to discover your important URLs, especially when internal links are sparse. They can also discover a page through links from other sites. Google’s sitemap guidance makes the limit clear: listing a URL does not guarantee crawling, indexing, or a higher ranking. Keep useful internal links in place as well.

Also, by adding a URL to a sitemap, you let the search engine know that you consider that page important. Google treats a sitemap as a hint, though, and listing a URL doesn’t guarantee that it gets crawled or indexed. Keeping weak pages out helps too, since search engines spend their crawling on the pages you want found.

For example, let’s say your site has 500 pages, but only 300 of them are worth finding. Listing just those 300 points search engines straight at the pages you want found, and leaves out thank-you pages, redirects, and anything marked noindex. Google says crawl budget is mainly a concern for sites with over a million pages, or over 10,000 pages that change daily, so for most sites a clean, current sitemap is plenty.

How To Create An XML Sitemap

There are a handful of ways to create an XML sitemap. The good news is that they’re all easy.

Create A Sitemap With WordPress

If you’re using WordPress, there’s a simple way to generate an XML sitemap. Add wp-sitemap.xml to the end of your site’s URL. Voila. WordPress has automatically generated your sitemap, and it lists it in your robots.txt file for you.

The WordPress wp-sitemap.xml page listing a posts sitemap and a users sitemap

However, this isn’t the best sitemap you can have, so we suggest using a plugin to help. That lets you have more control over what is and isn’t included in the sitemap. SEO plugins like Yoast and Rank Math replace it with their own sitemap, which lives at sitemap_index.xml.

Use A Sitemap SEO Plugin

When you create a sitemap using Yoast, your URLs are categorized to make the site structure clear.

A Yoast SEO sitemap index with the post sitemap highlighted

By clicking on one index sitemap (as seen in the above screenshot), you’ll land on a new page with all of the links for that specific sitemap (as seen in the image below).

A Yoast SEO post sitemap listing each URL with its image count and last modified date

For the most part, a non-Yoast SEO plugin will still create a similar-looking sitemap. There may be slight differences, but it will still work the same.

Creating a sitemap with an SEO plugin is a cinch. Let’s go over how it works in Yoast, and the steps will be similar no matter which plugin you choose.

After installing and activating Yoast, go to Yoast SEO in the left sidebar of the WordPress dashboard and select Settings. Open the Site features tab, then scroll down to Technical SEO to find the XML sitemaps option. Turn it on if it’s not already, then click Save changes.

Yoast SEO Site features tab with the XML sitemaps toggle

Your sitemap will be generated soon, at which point you can start submitting it to search engines.

More Ways To Create An XML Sitemap

If you don’t have WordPress, you’ll have to create your XML sitemap another way. While there are tools you can find online, Google suggests letting your website software generate the sitemap for you. For example, here’s Squarespace’s documentation about finding its sitemap, and Drupal has an XML sitemap module with information about it here.

It’s generally just as easy as using a plugin with WordPress, but will vary depending on your CMS.

Submit Your Sitemap To Search Engines

Now, you don’t have to submit your XML sitemap to any search engines. If the website has a thorough internal linking structure, search engines can discover the URLs by following those links. Search engines don’t rely on submissions; they crawl and re-crawl websites to find content.

Missing internal links can make pages harder to discover, which makes a sitemap especially useful. In Google Search Console, the Sitemaps report shows whether Google could read your submitted file and reports processing errors. Use Page indexing and URL inspection to investigate individual pages. Our guide to using a sitemap validator to troubleshoot errors covers additional checks for broken and non-canonical URLs.

It’s pretty painless to submit a sitemap, and we have guides for submitting your XML sitemap to Google, Bing and Yandex. Other search engines will have a similar process, and some, like DuckDuckGo, don’t let you submit sitemaps at all.

For those that do, however, it’s a good way to make sure you’re “in their system,” so to speak. You can be sure they know about you, have your site in their queue, and that you will have access to specific tools to help troubleshoot any visibility issues that come up over time.

You can also add a line like Sitemap: https://example.com/sitemap_index.xml to your robots.txt file, which any crawler that reads it will pick up. Google has retired its sitemap ping URL, so Search Console is where you tell Google about a new sitemap. Bing recommends pairing a sitemap with IndexNow, which pings participating search engines the moment a page changes.

HTML Sitemaps Vs. XML Sitemaps

HTML sitemaps are for people, while XML sitemaps are for web crawlers. An HTML sitemap is optional, but it helps visitors on a large site.

HTML Sitemap: Website visitors can see the HTML sitemap, and it helps them find a page that may not be easy to reach from the main menus. Usually, an HTML sitemap is linked to from the website footer:

The Barnes and Noble website footer with a link to its sitemap

Source: Barnes and Noble

When clicked into, an HTML sitemap will look something like this:

The Barnes and Noble HTML sitemap page

Source: Barnes and Noble

XML Sitemap: The XML sitemap is the most well-known, and it’s the type that search engines can read. Usually, the XML sitemap is in your domain’s root folder, like www.lindsaypietroluongo.com/sitemap_index.xml.

A Yoast SEO XML sitemap index listing six sitemaps

FAQ About Sitemap SEO

What should be included in a sitemap to optimize sitemap SEO?
The pages in your sitemap should be the most relevant URLs on your website. That means two things: you want people to land on the page, and it provides value to your audience. If a URL doesn’t check those boxes, it probably shouldn’t be in your sitemap. Know that even if you purposely leave pages out of your sitemap, search engines could still find and index them. To keep those pages out of search results, add a noindex tag. Our guide to nofollow and dofollow links covers the related link attributes.
Should I have more than one sitemap?
You need one XML sitemap for search engines to crawl, and an HTML sitemap is an optional extra for visitors. Otherwise, the answer to this question is: it depends. If you exceed the sitemap limits we mentioned earlier, like having over 50,000 URLs or going over 50MB (or whatever limit your SEO plugin sets), you’ll need to divide the URLs between multiple sitemaps. Then you will need to list them all in a primary sitemap index file. As for the other types of sitemaps, like image, news, or video sitemaps, you only need dedicated ones if that medium is your main business. If you’re a photographer, run a news site, or host a vlog, then yes, you should generate sitemaps for those types of media. Otherwise, you probably don’t have to go through the trouble.
What if I have sitemap errors?
If you’ve submitted your sitemap to the Google Search Console, it’ll flag any URL errors. You can also use a sitemap validator, which will process both XML and HTML sitemaps to search for errors, which include pages that search engines aren’t able to crawl, 401 or 404 errors, non-canonical URLs, etc.
Are there different kinds of sitemaps?
In addition to the two main types of sitemaps (HTML and XML), there are also image, news, and video sitemaps. Image and video sitemaps help search engines find and understand the multimedia content on your site. News sitemaps help search engines find content that’s Google News-approved.
Are WordPress sitemaps different from other platforms like Drupal, Joomla, and Squarespace?
Nope. An XML sitemap is an XML sitemap. That’s kind of the point. The idea is that search engines can crawl and index your site’s URLs no matter how you created that site. How to generate your sitemap may differ from platform to platform, but the XML format itself is standard.
What are the best sitemap SEO plugins for WordPress?
We’re partial to Yoast, but there are other great SEO plugins to consider that can help you generate sitemaps as well. Rank Math is also stellar in this regard. Mainly, you want to make sure that you can edit the sitemap. That way, you can remove URLs that you don’t want search engines to index. We have a roundup of 8 WordPress Sitemap Plugins to help you choose, covering Yoast, All in One SEO, Rank Math SEO, and SEOPress.

Keep Your Sitemap Useful And Current

Your sitemaps tell search engines and visitors where your most important pages are. They also leave out the pages that you don’t want to be found. Both of these efforts can help with your SEO efforts by prioritizing certain URLs and keeping crawlers focused on your best pages. And since creating and submitting sitemaps is a simple process, there’s no reason to skip it.

Want to improve your SEO even more? Once your sitemap is in place, we’ve got everything you need to know about white hat SEO tactics as a followup.

Divi

Want To Build Better WordPress Websites? Start Here! 👇

Take the first step towards a better website.

Get Started
Divi
Premade Layouts

Check Out These Related Posts

WordPress vs Astro (2026): Which One Fits Your Next Site?

WordPress vs Astro (2026): Which One Fits Your Next Site?

Posted on October 25, 2026 in WordPress

WordPress and Astro can both power a blog, portfolio, or business website, but they give you different starting points. WordPress includes a content management system with an editing dashboard, user accounts, and a media library. Astro is a web framework that lets developers build the front end and...

View Full Post
What Is A Theme Builder? Site Building With WordPress

What Is A Theme Builder? Site Building With WordPress

Posted on August 27, 2026 in WordPress

You build the homepage first. Then an about page, then a contact page. By the third one, you have the rhythm of it: drop in a section, add your content, style it, publish. One page, one design. Then you get to the blog. The rules change without warning. You are not designing a page anymore. You are...

View Full Post
Is AI Going To Kill WordPress?

Is AI Going To Kill WordPress?

Posted on August 14, 2026 in WordPress

Ask around right now whether AI is going to kill WordPress, and you’ll get wildly different answers depending on who you ask. Somewhere out there is a LinkedIn post you’ve probably already seen, arguing WordPress is basically dead — that nobody in their right mind would start a new...

View Full Post

Leave A Reply

Comments are reviewed and must adhere to our comments policy.

Get Started With Divi