If youâve ever sat down and read an article on SEO, youâve probably come across the terms sitemap and/or XML sitemap. But while sitemaps are a fairly common SEO recommendation, there arenât a ton of deep looks at how XML sitemaps specifically work with WordPress.
To fix that, weâre going to take a deep dive into WordPress sitemaps. Hereâs everything that youâll learn in this post:
An XML sitemap is basically just a list of URLs that you want to be publicly available. Like robots.txt, it helps search engines like Google and others better crawl your website by giving them a âmapâ of all your content. Thatâs it!
Beyond a raw list of URLs, you can also include other helpful âmetadataâ in your sitemap to further aid search engines in their attempts to index your site. These options are outlined in the Sitemaps protocol and let you specify things like:
- When a page was last modified
- What priority youâd like search engines to give to the page (though search engines wonât necessarily follow this)
- How often the page will change
Beyond those core pieces of metadata, itâs also possible to provide search engines with information on your video and image content.
What Does An XML Sitemap Look Like?
Wondering what an XML sitemap actually looks like? Hereâs what our WordPress post sitemap looks like at Kinsta:
As you can see…it really is just a list of URLs with some extra metadata. Itâs not especially helpful to humans!
Is There a Limit to How Many URLs You Can Include in an XML Sitemap?
Yes, there is a limit. But most WordPress websites will never sniff the limit.
Technically, sitemap.xml files have a limit of 50,000 URLs. But even if your site includes more than 50,000 URLs, you can include a âsitemap of your sitemapsâ to increase that number. That is, you can include one master sitemap that links to more specific sitemaps (each with its own separate 50,000 URL limit).
This is how we do things at Kinsta (and also how Yoast SEO does things by default – more on that later). The screenshot above was specifically for our WordPress posts. But if you go to our master sitemap file, youâll see that it actually just links to other sitemap files:
The main benefit of an XML sitemap is improved crawlability. In Googleâs own words, âsearch engine web crawlers like Googlebot read this file to more intelligently crawl your site.â Here are some specific ways in which XML sitemaps improve your siteâs crawlability:
- Faster crawl times – Sitemaps can help search engine robots crawl your content faster than they would without a sitemap. This can also lead to your content getting indexed faster.
- Prioritized crawls – Sitemaps let you ask Google to prioritize crawling certain pages on your site by adding metadata.
- Rich media content – if you use lots of media like videos and images, âGoogle can take additional information from sitemaps into account for search, where appropriate.â (source)
Beyond crawlability, there are also some backdoor ways in which sitemaps work to provide you with helpful information. Assuming you submit your sitemap to Google Search Console (youâll learn how to do this later on!), you can use your sitemap to quickly ascertain how effective you are at getting your pages indexed in Google:
Can Adding an XML Sitemap Hurt Your Site?
Nope! Donât worry. The worst case scenario is that you donât see any positive results.Â Creating an XML sitemap will never hurt your site.
Donât believe me? Hereâs what Google itself says on the topic: âin most cases, your site will benefit from having a sitemap, and you’ll never be penalized for having one.â
A Sitemap Doesnât Mean You Can Ignore Internal Link Structure, Though
While a sitemap is beneficial, hereâs what itâs not:Â Itâs not a replacement for creating a solid internal link structure. That is, donât assume that search engines will index your content simply because you included it in your sitemap. They might, but they also might not.
Google still wants to see that your content has internal or external links pointing towards it. As Google says, âUsing a sitemap doesn’t guarantee that all the items in your sitemap will be crawled and indexed.â
So, while you should absolutely use a sitemap, you shouldnât solely rely on a sitemap to get your content indexed.
Now that you know what an XML sitemap is and how it can benefit your site, how can you actually create a WordPress sitemap for all your content? The easiest way is using Yoast SEO, which is our recommended plugin.
To create an XML sitemap with Yoast SEO, you donât actually need to do anything beyond installing and activating the free Yoast SEO plugin. By default, Yoast SEO creates a sitemap at:
Thatâs easy enough! But what many people donât know is that Yoast SEO also lets you customize how your XML sitemap functions. Hereâs how to do it:
Go to SEO â Features and enable Advanced settings pages:
Make sure to save your changes. Once you do that, you can access the new XML Sitemaps option under the SEO menu in your dashboard sidebar:
There, you can use the tabs at the top to:
- Choose whether or not to include a sitemap of your authors
- Choose which post types/taxonomies to include in your sitemap
- Manually exclude individual pieces of content from your sitemap via their Post ID – this is especially helpful if youâve added a noindex tag to certain pieces of content.
Other WordPress Plugins To Help You Create An XML Sitemap
While Yoast SEO is our recommended tool to help you create an XML sitemap for WordPress, itâs by no means your only option.
Other quality plugins include:
- All in One SEO Pack – you just need to activate XML Sitemaps in the All in One SEO Feature Manager.
- Google XML Sitemaps – a popular plugin dedicated specifically to XML sitemaps, rather than SEO in general.
- The SEO Framework – an up-and-coming SEO plugin that includes XML sitemap functionality.
Not a fan of WordPress plugins? Or using something thatâs not WordPress? No worries – you can also create an XML sitemap using a standalone tool called XML Sitemap Generator. The tool lets you create an XML sitemap for your site via:
- A cloud-based tool
- A desktop program (just for Windows)
- A WordPress plugin (if you changed your mind about not wanting to use a WordPress plugin!)
Hereâs how to use the cloud tool to create your sitemap:
Head to XML Sitemap Generator, scroll down, and click on the Online Generator option:
On the next page…
- Enter the URL to your websiteâs homepage
- Choose how to calculate the last modified date
- Select the change frequency (how often your pages change)
- Choose the default crawl priority
- Enter your email address
- Click Generate sitemap
You can also click the More Settings button to configure more advanced options:
Once you click Generate sitemap, there will be a delay while XML Sitemap Generator crawls your site. If you have a small site, it will only take a little time, but large sites might take longer. Once it finishes, youâll be able to download your various sitemaps:
Once you download the sitemap file, youâll need to upload it to the root folder of your website.
Once you have a working XML sitemap, youâll want to take things one step further and actually submit that sitemap to the major search engines. This:
- Ensures that Google knows where to find your sitemap
- Gives you helpful data about how many pages Google has indexed (I showed you this screenshot earlier)
To submit your XML sitemap to Google, youâll need a Google Search Console account. If you donât already have one, hereâs how to sign up and verify your website with Google Search Console. Once you have your Google Search Console account set up, you can submit a sitemap by going to Crawl â Sitemaps and clicking the ADD/TEST SITEMAP button:
Then, add the location of your sitemap and click Submit. If you used Yoast SEO to create your sitemap, all you need to do is paste in âsitemap_index.xmlâ:
Once Google processes your sitemap, youâll be able to view statistics in that same area. This includes helpful information about errors (such as 404 errors) that might be occurring on your site, such as in the example below.
When we tested a sample of the URLs from your Sitemap, we found that some URLs were not accessible to Googlebot due to an HTTP status error. All accessible URLs will still be submitted.
How To Submit Your Sitemap To Bing
While Google is king, Bing still does exist. So for more coverage, you might also want to submit your sitemap to Bing. Hereâs Bingâs guide on how to do that. The process is pretty similar to Google – youâll need to sign up for a Bing Webmaster Tools account. Then, you can submit your sitemap right from your dashboard.
For all of this post, weâve focused specifically on XML sitemaps. But thatâs not the only kind of sitemap you might want to add to your WordPress site.Â HTML sitemaps are a more human-facing version of a sitemap. Youâve probably seen them before – theyâre basically a bulleted list of links that help humans easily navigate around your site.
For example, hereâs our (partial) sitemap at Kinsta:
HTML sitemaps donât necessarily include every single page on your site – but they do let visitors quickly navigate to all of your most important pages. While you can always manually create an HTML sitemap navigation area, a more automated approach is to use the Simple Sitemap plugin. This plugin lets you create a sitemap by:
- Only including certain post types
- Limiting the number of child pages that are shown
- Excluding specific post IDs
- Ordering your pages in different ways
The plugin also includes pre-made templates to help you quickly create common types of sitemaps. Once you set your options, you can display your sitemap anywhere on your site with a simple shortcode.
To use it, install and activate the plugin. Then, head to Settings â Simple Sitemap. You can either click on one of the demos to get a pre-made shortcode or create your own shortcode using the various shortcode attributes:
Start Using Sitemaps For WordPress Today
An XML sitemap is one of those things that every single WordPress site needs. While itâs not going to rocket your site straight to the top of the SERPs, it is a great way to get your site crawled faster and more thoroughly. The easiest way to create an XML sitemap on WordPress is via the Yoast SEO plugin, but you can also find plenty of other plugins to help you do it.
And once you create your sitemap, you should submit it to Google Search Console to gain valuable insights about how Google indexes your site. We hope you enjoyed our guide and please leave a comment if you have any further questions about working with WordPress and sitemaps.