WordPress Security Guide: 14 Pro Tips To Secure A WordPress Website
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.
In this post, I’ll discuss two types of sitemaps – XML sitemaps and HTML sitemaps. I’ll tell you what each type of sitemap is and its benefits. Then, I’ll show you how to create both XML and HTML sitemaps in WordPress.
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.
Here’s an example of what ShoutMeLoud’s XML sitemap looks like – you can also view the file here:
As you can see, the page is not meant for humans – it’s all about search engines!
In addition to having an XML sitemap for your WordPress posts and pages, you can also create separate sitemaps for your images and videos.
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
To this last point, Google recommends that you create an HTML sitemap in its Webmaster Guidelines. Specifically, they tell you to “provide a page with a human-readable list of links to [your] pages”.
HTML Sitemap vs XML Sitemap in WordPress?
So when it comes to an HTML sitemap vs an XML sitemap, which one should you use?
Trick question! You don’t need to choose just one.
Instead, a best practice is to use both an HTML sitemap and an XML sitemap. As you learned above, each has a slightly different use, and Google actually recommends that you offer both an HTML sitemap and an XML sitemap in its Webmaster Guidelines:
How To Create a Sitemap in WordPress
Now that you know what sitemaps are and what benefits they offer, let’s cover how to create a sitemap in WordPress and make sure search engines can access it.
I’ll cover creating both XML and HTML sitemaps.
How Much Does it Cost to Start a Self-Hosted WordPress Blog?
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 (our tutorial)
- Jetpack plugin
- All in One SEO Pack
- The SEO Framework
- 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
We have an entire guide on how to submit your sitemap to Google. It will take you through the process in detail.
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 (not your blog posts). 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
FAQs About Creating a Sitemap in WordPress:
To finish out this post, let me answer some frequently asked questions about creating a sitemap in WordPress.
Do you need to manually update the sitemap?
No! Your SEO plugin will automatically add any new content to your XML sitemap, and the Simple Sitemap plugin will automatically add new content to your HTML sitemap.
Why isn’t Google indexing all the content in my sitemap?
Your sitemaps help Google find all your content, but they don’t guarantee that Google will index your content. The ultimate decision always rests with Google.
Is there a limit on how many pages you can include in an XML sitemap?
Yes and no. A single XML sitemap file is limited to 50,000 URLs. However, if you need to include more than 50,000 URLs, you can simply create multiple XML sitemap files and collect them together in an XML index file.
This is actually how the Yoast SEO plugin does it by default. You can see how the main ShoutMeLoud sitemap is just a link to other sitemap files:
Final Thoughts on WordPress Sitemaps
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.
Do you have any questions about using sitemaps in WordPress? Share your thoughts in the comments!
Subscribe on YouTube
Sharing is caring ️
10 Smart Ways To Speed up WordPress Site & Load in <2 seconds