How to Create a Sitemap in WordPress (XML and HTML)
You create a lot of great content at your WordPress site, but that content is only valuable if humans and search engines are actually able to find it.
Sitemaps help you accomplish that by essentially giving humans and search engines a “map” of all the content on your “site” (hence the name). That makes them an important tool for both search engine optimization and usability.
What is a WordPress XML Sitemap?
A WordPress XML sitemap lets you tell search engines about all the content on your site. Though the XML sitemap file is publicly accessible, it’s not really something your human visitors will ever look at.
Essentially, it’s just a list of the URLs to all the content on your site, along with some other information, like when a piece of content was last modified, and maybe what priority you want Google to place on each page.
The Benefits of an XML Sitemap
An XML sitemap is beneficial for your site’s SEO.
At a basic level, it lets you tell Google and other search engines about all the content on your site. While an XML sitemap will not force Google to include all of your content in the search results, it does ensure that Google is at least aware of all your content, which helps improve the chance of Google indexing your content.
Beyond that, an XML sitemap is also beneficial because it lets you communicate additional information to Google like:
- How often you change a page – this helps Google crawl frequently-updated content more often.
- When the page was last updated – same idea!
- Alternative language versions of a page – this is helpful for multilingual sites.
XML sitemaps can also help you communicate information about multimedia content. For example, a video sitemap lets you give Google information about each video including its:
- Running time
- Age appropriateness
Long story short, the benefits of an XML sitemap are that it:
- Makes search engines aware of all your content
- Lets you share additional information about your content to optimize how search engines treat your content
Finally, according to Google, “in most cases, your site will benefit from having a sitemap, and you’ll never be penalized for having one.”
What is an HTML Sitemap?
In contrast to an XML sitemap, an HTML sitemap is more about helping your human visitors find content on your site (though it does have some benefits for SEO, too).
Whereas the XML sitemap was just a collection of code, an HTML sitemap is an actual page on your site that’s designed for humans to be able to navigate. The HTML sitemap includes links to all of your content (or maybe just your most important content, if your blog has thousands of posts).
Here’s an example of an HTML sitemap from ATB Financial:
Human visitors can see all of the content that ATB Financial offers and navigate straight to where they want to go.
The Benefits of an HTML Sitemap
For humans, the big benefit of an HTML sitemap is that it makes it easier for them to navigate your site.
But there are also some SEO benefits of an HTML sitemap. Basically, because an HTML sitemap is just a bunch of internal links, it helps you:
- Spread link equity around your site.
- Give Google’s crawlers another way to find all of your content.
HTML Sitemap vs XML Sitemap in WordPress?
So when it comes to an HTML sitemap vs an XML sitemap, which one should you use?
Instead, a best practice is to use both an HTML sitemap and an XML sitemap.
How To Create a Sitemap in WordPress
Create XML Sitemap in WordPress
Pretty much all of the major WordPress SEO plugins include XML sitemap functionality by default, so it’s unlikely that you’ll need to manually create an XML sitemap for your WordPress site.
For example, all of the following SEO plugins include built-in XML sitemap functionality:
- Yoast SEO
- Jetpack plugin
- All in One SEO Pack
- The SEO Framework
- SEO press
- Rank Math
If you aren’t using one of these plugins, you can also find other WordPress sitemap plugins.
How to Inform Search Engines About Your Sitemap
Once you create an XML sitemap with one of those plugins, you’ll need to tell search engines where they can find it.
You’ll do this from each search engine’s “webmaster tools” feature. For example:
- Google Search Console
- Bing Webmaster Tools
Create HTML Sitemap in WordPress
Depending on the size of your WordPress site, you can create an HTML sitemap in WordPress either manually or with a plugin.
If your site is small – for example, a brochure site – you can just create a regular page and manually add links to all your content.
However, as your site grows, it might no longer be feasible to manually manage your HTML sitemap.
In that case, you can use a free plugin called Simple Sitemap. Here’s an example of the type of sitemap that this tool will create:
Once you install and activate the plugin, create a new WordPress page and add the [simple-sitemap] shortcode where you want your HTML sitemap to appear:
By default, the shortcode will display all of your pages. However, you can modify its functionality using the following parameters:
- types – the post types you want to include in the sitemap. For example, “post”, “page”, or any custom post types that you’re using.
- show_label – where or not to show the heading label.
- links – show the sitemap as links or just text.
- page_depth – the hierarchy of child pages.
- order and orderby – what to order pages by.
- exclude – exclude specific content (by post ID).
For example, if you want to create separate sitemaps for your posts and pages, you could use two separate shortcodes like this:
- [simple-sitemap types=”page”] – a list of all your WordPress pages
- [simple-sitemap types=”post”] – a list of all your WordPress blog posts
To sum up, sitemaps are an important part of WordPress SEO.
No matter what your site is about, you should create sitemaps to help humans and search engines find your content.
At a bare minimum, create an XML sitemap with a plugin like Yoast SEO and submit it to search engines. It can only benefit you, and it will never hurt you. Again, here’s the text straight from Google – “in most cases, your site will benefit from having a sitemap, and you’ll never be penalized for having one.”
Beyond that, consider creating an HTML sitemap to help humans browse your site and spread some link equity around.