Add powerful XML and HTML sitemaps to WordPress

Hello friends,

Did you know that one of the ways to improve the indexation of your website is done by using XML and HTML sitemaps? These two are actually quite important for your On-Page SEO strategy.

In this post I will present to you several solutions that will allow you to create powerful XML and HTML sitemaps for your WordPress website.

Before we begin, let’s take a moment to explain the importance of the XML and HTML sitemaps:

The XML sitemap should be processed by search engines which follow the XML Sitemap standard like, Bing, Google and Yahoo. The standard practice is to have a file called “sitemap.xml” in the root directory of your domain so that it should be accessed publicly by visiting “http://*your-domain*/sitemap.xml”.

According to a sitemap is a suitable way for every webmaster to easily provide information to the search engines about the structure of each website. In order to be more precise, I’d say that this relates to all published pages that are available for crawling.

The XML sitemap consist of the URL’s for these pages. Also there is additional metadata for each of them that informs the crawling bots about details, related to each webpage. For example its last update, its importance, etc.

The HTML sitemap does pretty much the same but in HTML format. The difference is that this type of sitemap is targeted not only for the crawling bots, but also for the visitors of each website. Its usual structure is bulleted outline text for parent and child pages with a link for each URL. The HTML sitemap should be published as a standard page on your website (or at least the HTML file should be accessible publicly). This serves as additional navigation and helps the visitors to gain an overall impression of your website. Not to mention the high benefits of having additional internal links for your content, which is extremely important for On-Page SEO as it helps the crawling rate of your website.

How to create XML Sitemap in WordPress?

The easiest way is to install and activate Yoast SEO. Then you need to go to “SEO -> XML Sitemaps” (from the WordPress Dashboard) and then enable this functionality. You can define what should go in the sitemap structure.

Yoast SEO XML Sitemap Settings

For example you can define the max entries per sitemap, or you can choose whether to enable/disable the user sitemap. The latter consists of the URL’s for your author/user pages.

From the tab “Post Types” you can choose what type of content should go in the sitemap, besides the default pages and post types. Yoast SEO detects your custom post types and allows you to add them in the structure of the XML sitemap, if you consider this as important.

The “Excluded Posts” tab allows you to manually specify the ID’s of all posts that should not be included in your XML Sitemap.

The “Taxonomies” tab allows you to add or remove categories, tags and other custom taxonomies to/from the sitemap.

As you may know, Yoast SEO is WPML compatible. This means that your bilingual or multilingual website can have a stand-alone XML sitemap for each language. And the cool thing about it is that it is automatically generated!

Another way to add a XML Sitemap to your WordPress website is by using the plugin “Google Sitemap Generator” or also known as “Google XML Sitemaps”.

Google XML Sitemaps

Install and activate it and then head to the plugin’s options in your WordPress dashboard. There you can define some options and you will be presented with 2 sitemaps – one in XML format and one in HTML format.

So this answers how to generate an HTML Sitemap as well, right?

Yes and no! Yes – because you will get a file with a suitable URL structure in HTML format which can be accessible publicly by typing “http://*your-domain*/sitemap.html”, however it will have the same structure as your XML sitemap. It will be useful for the search engine bots, but not for your human visitors.

So in order to provide them with a suitable HTML Sitemap that will be used as a navigation tool and in the mean time will generate additional internal links, you need to install another plugin. It is called WP Sitemap Page. Its usage is as simple as possible but the result is looking awesome!

WP Sitemap Page

When you install and activate WP Sitemap Page you need to head to “Settings -> WP Sitemap Page” in your WordPress dashboard. There you will see the general settings which allow you to add a “nofollow” parameter to your HTML sitemap (not recommended but still possible) and also the ability to customize the display of the posts. Again you have the option to exclude content from this sitemap (a standard feature, if I may add) and you can also choose whether or not to display a link to the plugin at the end of your HTML Sitemap (in case you want to support the author and its creation).

You will see another tab, called “How to use”. There you will be presented with all the shortcodes that you can add to any post/page on your WordPress website in order to display a specific HTML sitemap. The default shortcode is wp_sitemap_page (in [ ] ) and in most of the cases you’d like to use this since it provides all the necessary features for a user-friendly HTML Sitemap and additional navigation.

When you are ready with the settings, please create a new page, called HTML Sitemap and place the default shortcode (or some of the other described in the “How to use” tab) and then publish it. Now you can enjoy your new HTML Sitemap. Don’t forget to make it publicly accessible by adding links in your WordPress menus to it, so that both visitors and bots can visit it.

In the final words of this post, I’d like to recommend to use either Yoast SEO or Google XML Sitemaps in order to generate your XML Sitemaps. These plugins may result in a conflict if they are both active in the same time. However it is still possible to use them both if you somehow are not satisfied with the XML Sitemap that Yoast SEO generates. Simply disable that functionality and configure only Google XML Sitemaps.

As for the HTML Sitemap – WP Sitemap Page is compatible with both plugins and you should not get any problems when using them together.

If you have any questions, please post them in the comment form below. Please share any opinions as well and don’t forget to share this post in social media as well!

See you soon friends!

About Daniel Angelov

AvatarHi! My name is Daniel Angelov and I am a guest-author at TheCMSPlace. I am a certified SEO and Digital Marketing Specialist. My passion is WordPress, Social Media, Project Management, Open Source Software, Marketing, SEO and Copywriting. In my free time I like reading and fishing. My personal blog is ""

One thought on “Add powerful XML and HTML sitemaps to WordPress”

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    This site uses Akismet to reduce spam. Learn how your comment data is processed.