Hurricane Katrina forms over the Bahamas becoming a category 5 hurricane, the Internet site YouTube goes online, Angela Merkel becomes the first female Chancellor of Germany: these major events took place in 2005.

That year, something more confidential also happened. And indirectly, it concerns you.

At this time, Google launched its sitemap protocol. This is the subject of our article of the day, which will teach you how to create a sitemap on WordPress.

You don’t know how to do it? You don’t use it? Wondering what it is for and if you need it?

You’ve come to the right place to find answers to your questions.

I will explain you everything, in detail, so that you can easily add this sitemap on your site.

You will probably have to consider creating two of them, by the way. But you will understand why by reading these lines. So stay right here.

Originally written in May 2018, this article was updated in June 2021.

Your best WordPress projects need the best host!

WPMarmite recommends Bluehost: great performance, great support. All you need for a great start.

Try Bluehost
CTA Bluehost WPMarmite

What is a WordPress sitemap?

A sitemap is a file that lists all of your website’s URLs. This plan of your site, accessible to your users, also helps search engine robots to obtain information about your content’s structure, while accelerating your site’s indexing.

Today, search engine robots are able to visit your site on their own, by crawling through your internal links.

To make it very simple, during the indexing phase, robots store your content in a database, before it is returned to Internet users via the search results.

In order for you to understand how a sitemap works, remember this good old roadmap. You know, the one that allowed you not to get lost when you went on vacation?

Woman hides behind a map

Well a sitemap is a kind of road map, but specifically designed for a search engine.

It will use it to navigate quickly, easily and efficiently through the content of your site.

It is therefore very useful for your SEO (Search Engine Optimization) strategy.

Speaking of websites, check out our detailed guide about choosing your domain name and the one for creating a professional WordPress website. And because we love helping you out, take a look at the best free WordPress themes.

The different types of sitemaps

There are two main types of sitemaps:

  • The XML sitemap
  • The HTML sitemap

Let’s find out more about them.

The XML sitemap

As its name indicates, it is a file in XML format (an extensible markup language) intended mainly for search engines.

It is strongly recommended to submit it to Google and Bing, in particular.

In short, this XML sitemap lists all the pages of a website, their date of last modification or the number of images. Objective: facilitate their indexation by search engines.

If you want to see what it looks like, take a look at the screenshot below. To be precise, this sitemap is a sitemap index: it manages several sitemaps at the same time (videos, snippets, articles, pages, etc.).

An example of a WordPress sitemap.
WPMarmite’s sitemap. As you can see, it isn’t that readable for common users…

The HTML sitemap

In the sitemap family, I present to you the brother: HTML sitemap.

This is a page that presents the details of the content of your site, its architecture in a way. It is frequently found in the footer, next to the legal notices, for example.

It often includes the pages, posts, categories, etc. of its site.

This allows a visitor – but also a search engine – to easily find their way around and navigate within your WordPress site.

With this type of sitemap, you will also improve the user experience (UX) of your readers. They will be able to easily find a type of content by going to this page.

That’s on paper. Because in reality, it’s not really our first choice to look for a Sitemap – often well hidden – when we are lost.

In fact, it will mainly help search engines to better index all the pages of a site, by making for example the deep pages accessible in 2 clicks.

Sitemap of Bluehost's website.

Besides, it’s very simple to set up. I will explain how to do it in Part 3.

Because there are some things you need to know first. Let’s find out what right now.

What type of sitemap should you use?

HTML or XML? XLHT or HML? TML or HXTL? Wow , wow, wow: you’re getting confused here!

But I understand your problem.

HTML Sitemap or XML Sitemap: you’re wondering which one to use? Answer: both, my dear.

And it’s not me who says it. On a video of its Youtube channel Google Webmasters, the famous search engine indicates that it is advisable to use one and the other.

What are the benefits of a sitemap?

Do you really need a sitemap?

Well, we’ve been talking technical stuff since now, but you might be wondering if you really need a sitemap on your site, right?

Google gives us a clear answer on this subject.

I am not in love with this search engine and have no share in its parent company, Alphabet. But as it has more than 90% of the search engine market share worldwide, I will quote it more often than its competitors (Bing in particular).

So according to Google, “in most cases, your site will benefit from having a sitemap, and you’ll never be penalized for having one”.

The company points out that a sitemap can improve the exploration of your site, especially if it:

  • Is “really large”. Robots will crawl (the action of retrieving information about your content via your links) and index your pages much faster. A 2009 article published on Moz’s excellent blog site, details that a Google robot takes on average 14 minutes to visit new content on a site using a sitemap and 1,375 minutes without!
  • Has “new and has few external links to it.”
  • Has “a large archive of content pages that are isolated or not well linked to each other.”
  • Has “a lot of rich media content (video, images) or is shown in Google News.”

I would like to draw your attention on this last point. You understood it, a sitemap can facilitate your indexing. It is a significant plus but do not rely only on it!

It is necessary to work on your internal linking (create links between your pages) so that search engine robots can easily navigate on your site.

If you want to try to appear on the first page of a search engine, this point should not be neglected.

Join the WPMarmite subscribers

Get the last WPMarmite posts (and also exclusive resources).

WPMarmite English newsletter

Now, I would like to ask you a question. Do you think you’ll get a little boost in search engine rankings if you create a sitemap?

You’d like that, right?

Let’s find out in the next part.

Will a sitemap improve your SEO?

The $100,000 question of the day: can a sitemap boost your ranking?

What an unbearable suspense. The answer is no. I’m sorry if I ruined your day.

Why? As mentioned above, a sitemap remains an indexing tool, not a ranking tool.

As Olivier Duffez, from the WebRankInfo website, reveals, “better work on internal links than on your sitemap file! […] In summary: you should NOT need a sitemap file to index your pages. Otherwise, it means your site is badly designed: it lacks internal links or the number of levels in the navigation is too high.”

Got it? After the theory, it’s time to practice. You will now see how to create a sitemap on WordPress.

How to create a sitemap on WordPress

WordPress does it natively by itself, but…

First option to create a sitemap on WordPress: don’t make it. What? But what is the man saying?

Sorry if I confused you, but it’s very simple, you’ll see. Since the launch of version 5.5 in August 2020, WordPress has natively integrated a feature into its core (called Core) that automatically generates XML sitemaps.

This means that every time you download the latest version of WordPress, the CMS will create an XML sitemap all by itself, without any effort on your part.

Man surfing on the sand.

Wonderful: get out the cotillions, perform two or three dance steps if you want. And that’s it, finito, the party’s already over, sorry.

If native XML sitemaps work without any problem, they have several limitations.

First of all, they are very simple and provide less information to the user than the sitemaps generated by some plugins like Yoast SEO, for example (you will see this in the next part).

More annoyingly, native XML sitemaps generated by WordPress are potentially dangerous.

The main problem would be the lack of a user interface to control and filter the elements sent in your XML sitemap file, which should not list all your content types, because some are private or irrelevant.

In summary: if you want to use native sitemaps generated by WordPress, you will have to customize and filter them by manipulating PHP code, if you don’t want to damage your SEO.

If you’re new to WordPress and/or don’t want to get your hands dirty, it’s a lot less fun, I guess.

Still, are you solid on your feet and ready to go to battle? Here are several resources that offer snippets (pieces of code):

Of course, if you want to test all this, only do it if you are sure of yourself. The slightest typo could make your site unavailable. Of course, remember to backup your site beforehand (files + database): you can never be too careful.

Okay, I see you sighing behind your screen. I get it: for you, touching a single line of code is out of the question.

Don’t panic: there is a simpler and just as efficient solution to create an XML sitemap on WordPress: using a plugin.

Which one, by the way? Answer in the next part.

Cat near a plug.
Don’t worry: you’ll soon see much clearer on this subject

Add an XML sitemap with the Yoast SEO plugin

Most SEO plugins have a feature to enable a sitemap.

WPMarmite uses Yoast SEO, one of the 10 most downloaded plugins of all time.

How to design a WordPress sitemap with Yoast? It’s very simple because the plugin automatically generates one (in XML format).

It will be automatically updated when you add, modify or delete a content.

And a little extra: no risk of duplicating the XML sitemap generated natively by WordPress: Yoast (in its version 14.5 or higher) will automatically deactivate it so that its own works perfectly.

No action is required on your part. If you ever disable Yoast for any reason, the native WordPress XML sitemap will take over.

Let’s take action now. Start by installing and activating Yoast. If you don’t know how to do this, check out this resource.

In your WordPress admin bar, on the left, hover over the SEO icon and click on General.

Yoast SEO general menu to access the settings to create a sitemap.

Then, click on the Features tab to activate your WordPress sitemap (if it is not already the case by default).

Features for the XML sitemaps on the WordPress Yoast SEO plugin.

Remember to click on the blue Save Changes button.

Next step: view your XML sitemap.

Simply click on the question mark next to XML sitemaps.

See the XML sitemap on Yoast SEO plugin.

Finish by clicking on the link See the XML sitemap. You should come across a page like this.

XML Sitemap generated by Yoast SEO for WPMarmite.

You wonder where to find the WordPress sitemap? To view your XML sitemap without using Yoast, just type in your browser: yoursite.com/sitemap_index.xml. Of course, replace yoursite.com by the name of your site. 😉
If you are not using Yoast and want to access the XML sitemap generated natively by WordPress, type in your browser:
yoursite.com/wp-sitemap.xml.

For your information, you don’t have to include everything in your sitemap. For example, it is not mandatory to include tags and media files.

On this subject, everything was very simple to set up with the old versions of Yoast.

From now on, you need to go to Search Appearance, and select the tab that interests you (Content Types, Media, Taxonomies, Archives, etc.).

Not displaying a content type on search engines automatically removes it from the sitemap. Of course, don’t do this with your articles and pages. With your tags, why not.

Exclude tags from your WordPress sitemap on Yoast SEO plugin.

On this point, Yoast’s documentation is quite instructive.

Finally, to do things properly, we will have to conclude by submitting your site to search engines.

A little more patience, you will see that later.

Before that, you will discover what are the alternatives to Yoast. After all, you don’t have to use it, even if we strongly recommend it.

Which other plugins can you use?

If Yoast doesn’t suit you, here are some alternatives:

Even if we repeat ourselves, we advocate simplicity, so we strongly advise you to use a plugin to create an XML sitemap on WordPress.

However, it is good to know that it is also possible to do it manually :

But by creating a WordPress sitemap without a plugin, you may make mistakes and get confused. Weigh the pros and cons carefully before choosing a solution.

The case of the HTML sitemap

Since the beginning, I talk about the XML sitemap. But let’s not forget the HTML sitemap, which also has its importance. Do you remember it?

I hope you are not too confused with all these names.

Don’t worry, we’ll keep it simple to build your HTML sitemap.

The best solution is to use the WP Sitemap Page plugin. It will create a sitemap page, which will contain all the contents present on your WordPress.

WP Sitemap Page plugin to download on WordPress.

Install it and then activate it.

Then, on your WordPress administration, add a Sitemap page and copy and paste the shortcode below:

WP Sitemap Page shortcode for a WordPress site.

Publish the page and insert a link to it in your footer, for example.

Sitemap link in Bluehost's website footer.

In the WordPress Sitemap Page plugin settings, you will be able to manually exclude certain pages and custom post types.

For example, the sitemap page is listed by default. A good practice is to exclude it by retrieving its ID from the WordPress administration URL.

Exclude pages by adding the IDs on the WP Sitemap Page plugin.

A way to exclude elements from the sitemap would be a big plus for this plugin. It would save a lot of fiddling with IDs, wouldn’t it?

How to submit your XML sitemap to search engines?

The method to add your sitemap on the Google Search Console

Your last mission, if you accept it: submit your XML sitemap to Google.

It is able to locate it by itself, but indicating that you have one has 2 major advantages:

  • Clearly informing it where it can find this sitemap.
  • Being able to access a series of analytical data such as the number of web pages and images indexed, or the errors encountered.

Everything happens on a tool called Google Search Console. It allows you to better manage your site and to follow your SEO by providing a lot of information (errors on your site, search analysis, links, indexing status, crawling errors, etc.).

Free, it is essential for any webmaster.

I will now detail the procedure, step by step.

Step 1: Login to the Search Console

If you haven’t already done so, you’ll need to log in to this address first. Of course, you need to have a Google account to do this.

Step 2: Adding your website

Then, you have to register your site by clicking on the Add a property button, located on the top left-hand side of the homepage.

Add a property on your Google Search Console.

Then enter the URL of your site in the Domain box:

Select property type on Google Search Console and add Domain.

Then follow the required instructions.

From now on, Google recognizes you as the owner of the site.

Step 3: Adding your sitemap

In the Google Search Console sidebar, under the Index menu, click on Sitemaps:

Sitemaps settings menu on the Google Search Console.

Paste the text sitemap_index.xml and press Submit.

In theory, there should be no problem if you have correctly followed all the steps.
When Google will have recognized your sitemap, you will see it appear just below, in the “Submitted sitemaps” box.

Submitted sitemaps on the Google Search Console.

Your sitemap has been submitted to Google, congratulations. To check that there are no errors, simply click on the link corresponding to your sitemap, in the “Submitted Sitemaps” box.

If you see the following sentence displayed: “Sitemap index processed successfully”, accompanied by a small green sign, it’s all good.

Sitemap index processed successfully message on the Google Search Console.

From now on, let Google do its job and explore what’s inside. 😉

How to add your sitemap on Bing?

According to Statcounter, Google had a stunning 92.18% market share in the whole world, as of May 2021. Far, far, far behind it is Bing (2.27%).

But it can also be useful to submit your sitemap to Bing.

You must first create an account on Webmaster Tools. Then you can submit the sitemap from your Dashboard.

Here is the link to the search engine’s documentation.

And now it’s your turn

You are about to finish reading this article explaining how to create a sitemap on WordPress.

They list the pages of your website to facilitate the indexing of your content by search engines.

If possible, use both at the same time. This is a good practice to improve the indexing of your site and therefore your SEO.

Now it’s time to put all this into practice.

Start by explaining us, in comments, what type of sitemap you use.

Do you have any comments or questions to ask us? If so, let us know right below.

And if you think this article can be useful to others, feel free to share it on social networks.