How To Create a Sitemap in WordPress?

Adding a sitemap is crucial for your website’s performance. It helps your audience and the search engines to navigate your website with ease. But, how to create a sitemap in WordPress?  

If you are struggling to find a solution to this query, then we can be your help. We have illustrated an exhaustive guide on creating sitemaps using different approaches. 

With this article, you can add both XML and HTML sitemap to your website. Both of these sitemaps are essential for providing better navigation and indirectly increasing your SEO performance. 

Let us dive into the content, starting with the introduction of sitemaps. 

What is a Sitemap in WordPress?

WordPress sitemap is a list of URLs that represents your entire website content. You want to include sitemaps to optimize your content for search engines. It can also make website navigation easy for your website visitors.  

Let us elaborate it using an example where you go for dinner in a five-star restaurant. You grab a menu with a list of delicacies available there. The menu card gives you a clear understanding of what that restaurant can offer you. 

Similarly, sitemaps help Google, Bing, Yahoo, etc. to know what your website offers. 

Search engines use web crawlers to browse your content and index them on their SERPs. Sitemaps work as a guide map for GoogleBot and other bots to locate your web pages quickly. 

Web crawlers can browse every piece of information on your site using sitemaps. It helps search engines to show your content on their results whenever users enter a relevant keyword. 

Why Do You Need a Sitemap in WordPress Site?

Sitemaps are essential for your WordPress website for two reasons. The main reason is for SEO purposes. Google recommends using a sitemap as it helps search engines to discover your content quickly. 

However, sitemaps cannot directly impact your chances of ranking higher on SERP. It has other benefits that help your site perform well in Search Engine Optimization (SEO). 

Search engines download your sitemap to stay updated with any changes you make on your site. Using sitemaps, you can also allow search engines to browse a webpage that is not indexed.

Additionally, if you create a new website or blog, Google will have difficulty finding your web content. A new WordPress site rarely has any authentic backlinks and other ways to locate it. 

Submitting sitemaps to search engines is a great way to let them know your site exists. 

Sitemaps are also great for communicating with Google regarding which web pages are crucial. Besides, web crawlers use sitemaps to identify which content gets frequent updates on your website.  

Different Types of Sitemap in WordPress

There are two varieties of sitemaps that you can include in your WordPress site. You need to know their difference because each of them features a specific purpose. Here is the brief description of these two sitemaps:

1. XML Sitemap

XML sitemaps are a technical piece of information that targets search engines and not your website audiences. It includes URL and other plenty of information related to your webpages. 

Web crawlers can determine your content’s authority based on these data. Googlebot and other bots can also check when you update a webpage. Search engines use the XML sitemap to browse and locate your website content.

2. HTML Sitemap

HTML sitemap targets mainly your website visitors. It helps your audience to navigate your site using strategically-located buttons easily. You can use an HTML sitemap to include links to all your web pages in one place, like your footer. 

Some of the pages include Contact Us, Shop, About Us, Blog, and more. 

Besides, search engines also consider adding HTML sitemaps as an effective practice to boost your ranking on SERPs. 

How to Create a Sitemap in WordPress?

We hope the sections helped you get the gist of sitemaps and why they are essential. Now, you are going to learn some of the widely-used methods to create a sitemap in WordPress. 

In this section, we have divided the process of adding a sitemap on your website into two subdomains. Let’s begin with the first topic, shall we?

1. How to Create XML Sitemap in your WordPress site?

Several WordPress plugins help you make an XML sitemap for your website. We will explain the steps required to create it using four different plugins. You can select any one of these extensions based on your preference. 

A. Create XML Sitemap Using the Yoast SEO Plugin

Yoast SEO is a perfect WordPress plugin for optimizing your website for search engines. You can enhance your content, optimize relevant keywords, manage the external and internal linking system, etc. 

You have to install the Yoast SEO plugin before creating an XML sitemap with it. Go to the Plugins page in the WordPress dashboard and click on the Add New button. Type its keyword in the text box shown below and select the first option. 

Installing and activating the Yoast SEO WordPress plugin

Install this plugin, activate it, and go to its Settings page. You can see three options at the top of the page, which is Dashboard, Features, and Webmaster Tools. Select the Features option among them. 

Showing the Features option in the General settings of Yoast SEO

Scroll down in the Features page and search for the XML sitemaps title. When you find it, make sure you turn on its setting. Please click on the question mark symbol (?) situated on its right side. 

Pointing at the Question symbol of XML sitemaps in WordPress

You can see brief information regarding the XML sitemap right below its title. There are also two sentences with hyperlink situated on the right side of the text. Click on the “See the XML sitemap” button to proceed. 

Highlighting the URL that displays the XML sitemaps in WordPress

WordPress takes you to a page that displays all sitemaps included on your site. Besides, you can also open this page later using the give URL format. Replace the word “websitename” with your actual website name. 

http://www.websitename.com/sitemap_index.xml

B. Create XML Sitemap Using the RankMath Plugin

RankMath is a free WordPress plugin that provides widely-accepted best SEO practices. You get a clean and easy-to-use interface with this extension. It also runs a detailed analysis to find out the major SEO issues on your website. 

Let us install RankMath on WordPress and learn how to create an XML sitemap with it. First, go to the Add Plugins page on your WordPress dashboard. Enter its keyword in the text box and select the first option with 400,000+ downloads. 

Installing and activating the RankMath WordPress plugin

Now go to the WordPress sidebar and search for the RankMath button. Hover your mouse cursor on it, and you can see a drop-down menu bar. Click on the Sitemap Settings option from the menu. 

Highlighting the Sitemap settings under the RankMath option

You enter a page that has general settings regarding XML sitemaps. Observe the message displayed right below the title section. You can see a URL that takes you to your sitemap for your website. Click on it. 

Pointing at the XML Sitemap URL of your website in WordPress

After you click on that URL, RankMath takes you to the XML Sitemap page. You can see in the screenshot below that our XML sitemap index file contains five sitemaps. The RankMath plugin generated all of these sitemaps. 

XML Sitemap page generated by the RankMath WordPress plugin

Return to the RankMath plugin’s interface and make any additional changes with sitemaps. You can also ping Google and Bing whenever you update the sitemaps. Please click on the Save Changes button after finishing all the edits.

Ping Search Engines option of the RankMath WordPress plugin

C. Create XML Sitemap Using the Google XML Sitemap Plugin

Google XML Sitemap plugin is a popular plugin that you can use to create sitemaps for SEO. It also automatically search engines, like Google and Bing, after making any changes to your content. 

Let us learn how to create XML sitemaps with this useful plugin. Go to the Add Plugins page in your WordPress dashboard and enter Google XML Sitemaps in the keyword text box. Install the first plugin uploaded by Auctullo

Installing and activating Google XML Sitemaps WordPress plugin

WordPress takes you to the Installed Plugins page. Scroll down till you see the Google XML Sitemap option. Look at the right side of the title, and you can see its brief description and few buttons. Click on the Settings button to proceed. 

Pointing at the Settings button of Google XML Sitemaps plugin

You enter the XML Sitemap Generator page with a variety of sections and options. Look at the first section of this page. You can see a text pointing to the URL of your sitemap index file for the website. Click on that hyperlinked text. 

Pointing at the URL to your Sitemap index file in WordPress

This hyperlink takes you to the XML Sitemap Index page. You can see the URL of all the sub-sitemaps and their last modified date, created by the Google XML Sitemap plugin. 

XML Sitemap Index generated by the Google XML Sitemaps plugin

Besides, this plugin also provides a variety of settings related to your XML sitemaps. For instance, you can notify Google and Bing about any changes or updates on your site. 

Settings in WordPress to notify Google and Bing about sitemaps

Scroll down in the XML Sitemap Generator page till you see the Update Options button.  Now, click on this button after completing edits. 

D. Create XML Sitemap Using the XML Sitemap and Google News Plugin

XML Sitemap and Google News is a WordPress plugin that creates XML sitemaps and Google news sitemap protocol. It supports multilingual plugins, like Polylang and WPML, to index all languages on search engines equally. 

Let us start the process by installing it on our WordPress dashboard. Enter the keyword “XML Sitemap and Google News Ravanh” into the Add Plugins page’s textbox. Install the first option with 90,000+ active installs, as shown in the screenshot. 

Installing and activating the XML Sitemaps and Google News WordPress plugin

After that, visit your WordPress dashboard and scroll down until you see the left sidebar’s Settings option. Hover your mouse cursor at it, and you can see a drop-down menu. Select the XML Sitemap button from that menu. 

Pointing at the XML Sitemap option inside Settings option in WordPress

You enter the XML Settings control that is generated by the XML Sitemaps & Google News plugin. Focus on the right side of the page where you can see the View section. Click on the XML Sitemap Index hyperlink situated right under the section title. 

Pointing at the XML Sitemap Index hyperlink in WordPress

With this action, a new tab opens up in your browser titled XML Sitemap Feed – Index. You can see the URL and the modified dates of all sitemaps created by the XML Sitemaps & Google News plugin. 

XML Sitemap Feed created by the XML Sitemaps and Google News WordPress plugin

Similar to the previous plugins, XML Sitemap & Google News also allows you to ping search engines. After each update you make, let Google, Bing, and Yahoo know about it using the button situated under the Tools section. 

Pointing at the Ping Search Engines button in WordPress

2. How to Create an HTML Sitemap in your WordPress Site?

After creating an XML sitemap to facilitate web crawlers, it's time to make an HTML sitemap for human visitors. We have explained the step-by-step to create an HTML sitemap using the WP Sitemap Page plugin. 

WP Sitemap Page provides a simple approach for adding a sitemap into your website. You can create an HTML sitemap that includes the list of all crucial pages and posts on a single location. 

Let us follow the same process as we do to install every other plugin in WordPress. Go to the Add Plugins page and enter its keyword WP Sitemap Page on the text box. Install and activate the first option uploaded by Tony Archambeau. 

Installing and activating the WP Sitemap Page WordPress plugin

Return to the WordPress dashboard and scroll down till you see the Settings button in the sidebar. You can see a drop-down menu when you hover over it. Click on the WP Sitemap Page option on the menu, as shown in the screenshot. 

Pointing at WP Sitemap Page button inside Settings option in WordPress

Its editing interface lets you customize how you want your sitemap’s appearance to be. Since your web audiences will interact with it, make sure it appeals to the human eye. WP Sitemap Page also allows you to exclude some pages, post types, etc.

Customization settings of the WP Sitemap Page WordPress plugin

The next step includes clicking on the Save Changes button. You can find this button at the end of the page.

To display the HTML sitemap on your web page, you have to paste a shortcode text on that particular page. If you want to display all of its pages on the sitemap, then copy this code:

[wp_sitemap_page]

WP Sitemap Page provides a variety of other shortcodes as well. These codes allow you to customize what type of content you want to display. Take a look at the screenshot below.

Displaying the shortcodes generated by WP Sitemap Page plugin

List down the shortcode you want to insert on your web page and go back to the WordPress dashboard. Click on the Pages option on the sidebar. You can rather click on the Posts option if you want to insert your sitemap on a post instead.

Pointing at the All Pages button inside Pages option in WordPress

You can see all the pages that you created for your WordPress site. Select any one of them and click at the edit button situated below the page title. For instance, we selected the About page, and you can see its “edit” button here. 

Pointing at the Edit button below the page title in WordPress

You are now inside the editing interface of your website page. Go to the end of the content and insert the shortcode that you copied earlier. Click on the Update button at the top-right corner of the page to save the changes. 

Inserting XML sitemap shortcode in page editing interface of WordPress

Now you have to check whether the sitemap is working or not. Simply enter the URL of that page on a new tab. Or you can also click on the Preview option in the previous editing page, at the left side of the Update button. 

Displaying the HTML sitemap created by WP Sitemap Page plugin

If you were successful in creating an HTML sitemap, it would look like the above-displayed screenshot. It is user-friendly and helps your web audiences to navigate conveniently. 

How Should You Submit XML Sitemap to Google?

Google is quick at finding sitemaps once you ping them your updates. However, we highly recommend you submit the XML sitemap manually. This way, you can rest assured, knowing that Google has access to your website. 

We will use the Google Search Console tool for this purpose. 

Google Search Console helps you perform better in search engines with different solutions. It provides updates on your website’s search traffic and performance and also helps you fix issues. 

Visit Google Search Console’s official website and click on the Start Now button. You have to sign in to its dashboard using your email address. 

Showing the Start Now button of Google Search Console’s homepage

After signing in, you enter the Welcome page of this online tool. 

You get two options to proceed with the verification of your website’s ownership. We recommend you to select the second option, URL Prefix. Provide your website URL on the text box and click on Continue. 

Pointing to the URL Prefix option in the Google Search Console page

Now you can see that there are plenty of verification methods for URL Prefix. Google displays the default method, using the HTML file, at the top. However, we will be using the second method, using the HTML tag instead. 

There is a meta tag provided in the text box. Copy the code and save it on a notepad for now. Do not close this tab and simply go back to your WordPress dashboard. 

HTML tag of Google Search Console for verifying ownership of website

The next step involves installing the Insert Headers and Footers plugin to your website. This WordPress plugin helps you insert codes from Google Analytics, Facebook Pixel, and other platforms. 

Enter the keyword Insert Headers and Footers in the text box of Add Plugins page. Install and Activate the first option that has the owner’s name as WPBeginner. 

Installing and activating Insert Headers and Footers WordPress plugin

Now, look at the sidebar of your WordPress dashboard. Scroll down until you see the Settings button. Hover your mouse cursor on it and select the Insert Headers and Footers option from its drop-down menu. 

Showing the Insert Headers and Footers option inside Settings button

You can see three text boxes for inserting meta tags in the Settings page of Insert Headers and Footers plugin. Paste the HTML meta tag that you copied earlier in the scripts in the Header section. 

Inserting HTML tag into the Scripts in Header text box of WordPress

Scroll down to click on the Save button after inserting the tag. Now go back to the Google Search Console tab on your browser. Click on the Verify button. After Google verifies your website’s ownership, enter the Google Search Console’s dashboard. 

Showing the Verify button in Google Search Console’s verification window

Now it's time to add your website sitemap to your Google Search Console account. Go to the left sidebar and click on the Sitemaps button situated under the Index topic. On this page, you can see an Add a New Sitemap section.

Pointing at the Sitemaps option in sidebar of Google Search Console

You have to open the sitemap of your website on a new browser. Copy the last part of your XML sitemap URL. Paste it on the Add a New Sitemap section of your Google Search Console dashboard. Click on the Submit button to save the update. 

Inserting XML sitemap feed URL in Google Search Console’s dashboard

Google will take some time, or even days, to finalize your website’s verification. After it completes the processing, you can see the basic stats of your XML sitemap. This stat includes the total number of URLs, last read date, and more. 

Displaying the basic stats of XML sitemaps in Google Search Console

Wrapping Up!

Creating a sitemap in WordPress is easy, right? Since it gives various benefits regarding website navigation, you should not skip it by any chance. 

So, are you ready to generate a sitemap and submit to search engines? Besides, don’t limit to only a single sitemap. Add both XML and HTML sitemaps to assist your human audiences and search engine bots as well. 

Please mention any feedback or suggestions in the comment section below.

Related Articles

How to Back Up WordPress Site?

Losing a website is a big deal. It can happen due to malicious hackers, faulty plugins, hosting failure, or physical server damage.  In case you haven’t backed up your website,…

Leave a Reply

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