WordPress Sitemap: What It Is and How to Create One
Creating a WordPress sitemap is one of the many ways to optimize a WordPress website for SEO. By using a WordPress sitemap, website visitors and search engine bots can see the structure of a site better.
When you’re familiar with WordPress basics, understanding sitemaps can help develop your website further. WordPress sitemaps create a better user experience for visitors and provide accurate information for search engines to crawl.
This article will provide more details on the benefits of generating sitemaps for WordPress websites. We will also explain the differences between an XML and HTML sitemap and how both of them help optimize a site.
In addition, you will learn how to generate both sitemaps for your WordPress site and submit a sitemap to Google and Bing.
Without further ado, let’s get started.
What Is a WordPress Sitemap and Why Do You Need It?
A WordPress sitemap is a list of all the public URLs on a WordPress website. Sitemaps help visitors and search engines navigate through all of the URLs in a site faster and easier. They can also show the relationship between different pages and the importance of each page. Read our guide if you want to learn more about what is sitemap in general.
A WordPress sitemap helps website owners by:
- Notifying search engines – alerts search engine crawlers and shows visitors when there are new posts on a website. WordPress sitemaps also inform search engines about pages on a site that they have not indexed before.
- Easy navigation – shows the structure and hierarchy of web pages by providing a complete list of custom URLs.
- Search engine optimization – helps optimize a website by notifying search engines that the website does not have duplicate content. Sitemaps also make a website more user-friendly, which improves its ranking on search engine page results (SERPs).
Differences Between an XML and HTML WordPress Sitemap
There are two different types of WordPress sitemap: an XML sitemap and an HTML sitemap. Each type plays a significant role in optimizing a website in its own different ways.
When submitting a WordPress sitemap to search engines, use an Extensible Markup Language (XML) sitemap. With this language, search engine bots will find content and information easier. XML sitemaps also provide additional metadata and context of each URL.
Meanwhile, HTML sitemaps provide links representing all web pages using HTML format. This functionality presents all public pages on a site in a more user-friendly way, making it easier to navigate.
The main difference between the two sitemaps is that an XML sitemap is located in a separate URL and focuses on search engines. Meanwhile, an HTML sitemap can be included in the web pages for website visitors.
We recommend having both WordPress sitemaps to guarantee an optimal user experience, which will increase your search engine ranking as a result.
How to Generate a WordPress XML Sitemap Manually?
Generating a WordPress XML sitemap manually will help to specify the exact information search engine crawlers will learn. However, it will take more time to create a WordPress sitemap manually, especially for websites with more than 10 URLs.
To create WordPress sitemaps manually, open a text editor, such as Windows Notepad, or Nano for Linux and macOS users. Keep note that the file needs to be in XML format. In it, include the URL of your website, and all the necessary information search engines should know.
Here is an example of an XML sitemap:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://www.example.com/</loc> <lastmod>2021-07-18</lastmod> <changefreq>monthly</changefreq> <priority>0.5</priority> </url> </urlset>
In this sitemap, there are both required and optional tags. Below is an explanation of the required tags:
- <urlset> – reference the current protocol standard. Keep the URL in the example for your XML sitemap file.
- <url> – parent tag for the URL. The rest of the tags are included inside this tag.
- <loc> – URL of the website. It must start with the protocol, such as HTTP, and end with a trailing slash if your web server uses it. The value for this tag must be under 2,048 characters.
In addition, some of the optional tags to consider are:
- <lastmod> – shows the last modification time of the website. Use the YYYY-MM-DD format for this tag.
- <changefreq> – reveals how frequently the website makes changes. The valid values are: always, hourly, daily, weekly, monthly, yearly, and never.
- <priority> – let search engines know which URLs are most important for the crawlers. The valid values range from 0.0 to 1.0, with the default 0.5.
Once you have created an XML sitemap file, upload it to your WordPress root folder. Then, access the sitemap URL to check the WordPress sitemap. Usually, the URL follows this format:
After finding the sitemap URL, validate it with the sitemap validator. Invalid sitemap files might hamper WordPress websites. So, it is essential to check first with a validator before submitting XML sitemaps to search engines.
To use the sitemap validator, enter the sitemap URL on the validator and click on the VALIDATE SITEMAP button.
If the WordPress sitemap is valid, it will show a No issues detected banner.
However, if the WordPress sitemap is invalid, it will show a Problem detected warning message.
How to Generate a WordPress XML Sitemap Using a Plugin?
To automatically create a sitemap in WordPress, use sitemap plugins. It is a faster and more reliable way to generate a WordPress sitemap.
By installing a WordPress plugin, users will receive additional features and functionalities to help optimize their website. The plugins also help to update WordPress sitemaps when any changes are made automatically.
Below you’ll find guides on how to generate a WordPress XML sitemap with two of the best WordPress plugins for the job.
Generate a WordPress Sitemap Using Yoast SEO
Yoast plugin is one of the most popular SEO plugins for WordPress. This SEO plugin takes care of all the technical aspects related to optimizing WordPress content, including the creation of XML sitemaps.
Follow these steps to create your own WordPress sitemap:
- Head to WordPress Dashboard -> Plugins -> Add New and look for the Yoast SEO plugin. Click on Install Now and Activate the plugin’s free version.
- Go to the SEO menu on the dashboard, and select General. Then, enter the Features tab to see the settings.
- Under the features tab, select the On button below XML sitemaps and click on the Save changes button.
- To check the XML sitemap link, click on the question mark icon and select the See the XML Sitemap option.
- Yoast SEO will redirect you to the XML sitemap URL. There, you will see more information about each URL on your site.
In addition, Yoast SEO has the Webmaster Tools setting which can connect a WordPress website to different search engines right away. By doing so, it will be easier to submit and notify of updates to various search engines.
Google XML Sitemaps
The Google XML Sitemaps plugin is great for those who prefer advanced sitemap settings and the option to submit one to search engines right away.
Another notable XML sitemap feature is its automatic notifications to major search engines when new content is posted or published. Follow the steps below to use the plugin:
- Install the XML Sitemaps plugin from the WordPress plugin directory.
- Open the configuration page by going to Settings -> XML-Sitemap. As the plugin automatically generates an XML sitemap for a WordPress site, you will see the sitemap URL there.
- Click on the URL to see the XML Sitemap Index.
To notify search engines, head to Settings -> XML-Sitemap and find the Basic Options section. Check off the first two boxes to notify both Google and Bing, and click on the Update options button at the bottom of the page.
How to Submit a WordPress XML Sitemap to Search Engines?
After generating a WordPress sitemap, submit it to search engines like Google and Bing to get indexed. Note that while search engines will still crawl websites without manual submission, submitting WordPress XML sitemaps to search engines will still provide additional benefits:
- SEO – sitemaps notify search engines when there are changes or new content, which helps your page remain updated in the search engine results.
- Accuracy – with the help of a WordPress sitemap, a search engine will only index the most accurate and relevant information of a site.
- Free – there is no cost to generate a WordPress sitemap, no matter the method.
- Organic traffic – generate more visits by ranking higher on SERPs.
Important! Before submitting a WordPress site to search engines, you need an XML sitemap URL.
Submit an XML Sitemap to Google
Submitting a WordPress sitemap to Google will drive higher traffic and increase awareness of a website. Website owners can do so by using Google Search Console.
Log into your Google account and follow the steps below:
- Select the property type to start. To get information on all URLs across the domain, select the Domain option. Enter your domain name and click on the CONTINUE button.
- Verify the domain by adding the TXT record from the Google Search Console to your domain name system (DNS) server. With Hostinger, head to hPanel -> DNS Zone Editor and add the record under the Manage DNS records box.
- Head back to the Google Search Console account and select Sitemaps on the left sidebar menu. There, insert your sitemap URL under the Add a new sitemap section and click SUBMIT to finalize the process.
To check the status, head to Sitemaps -> Submitted sitemaps. Google Search Console will share the status and give feedback on optimizing your site using documentation and resources.
Submit a WordPress XML Sitemap to Bing
Bing is another popular search engine to submit a website to since other search engines, such as Yahoo and DuckDuckGo, also use its search index for rankings. Website owners can use the Bing Webmaster Tools for immediate crawling and indexing.
Follow the steps below to submit WordPress XML sitemaps to Bing:
- Use Microsoft, Google, or Facebook accounts to sign in to Bing Webmaster Tools.
- Under the Add your site manually section, add your website’s URL. If the URL has been verified on Google Search Console, sign in using your Google account and click the Import button.
- Select Sitemaps -> Submit Sitemaps and add the sitemap URL to notify the tool to index your site.
To explore the status of the indexing, click Site Explorer on the left sidebar menu.
How to Create an HTML Sitemap Page for WordPress?
As mentioned before, the WordPress HTML sitemap is an essential part of SEO. It provides user-friendly navigation for website visitors and establishes a clear structure for the web pages.
The easiest way to create an HTML sitemap for a WordPress site is by installing a plugin. We recommend using the WP Sitemap Page:
- Install WP Sitemap Page and activate the plugin.
- Head to Dashboard -> Pages -> Add New to create a new page on a WordPress site. To add the WordPress sitemap to an existing page, select the page under the Pages section. That said, we do recommend creating a new page instead.
- Insert the following WordPress shortcode to add the HTML sitemap:
- Click Publish, and the WordPress HTML sitemap will be available on your website.
This article has shared two different ways to generate WordPress sitemaps: manually and by using plugins. If you choose to do so manually, you will be able to choose the exact information to include in your sitemap. However, doing so takes more effort and involves an extra step of using a validator tool to test your sitemap.
Instead, we recommend using one of the plugins to create both the HTML and XML sitemaps. We have also shared the steps to submit a WordPress sitemap to Google and Bing.
Don’t hesitate to share your experience in generating and submitting a WordPress sitemap in the comment section below.
Learn More About WordPress SEO
WordPress Robots.txt Guide
How to Add WordPress Schema Markup
How to Add Meta Description and Meta Title in WordPress
How to Setup AMP (Accelerated Mobile Pages) in WordPress
How to Prevent Search Engines from Indexing Your WordPress Site
How to Add Breadcrumbs in WordPress
March 15 2018
Thankkss so much
March 23 2018
Hi Kirill, Glad this tutorial helped!
March 18 2018
Hi Lindsay Thanks for the detailed article. I tried creating sitemaps using Yoast SEO and Google sitemaps creator but i failed. When i go to mywebsite.com/sitemap_index.xml it says http error 500. I disabled yoast and enabled again, tried disabling all the plugins still unsuccessful. Is there anything i need to change in .htacess as well?
March 23 2018
Hey Hunter, There should be no need to change anything in your .htaccess unless you are using custom .htaccess rules. In this case, try switching back to default WordPress .htaccess
March 25 2018
Thanks for your response. I was using custom .htaccess After some digging found out the error is because of WP MEMORY LIMIT, I increased it to 256MB and it was fixed.
March 26 2018
Hey Hunter, Glad to you know you manage to fix it!
February 10 2019
Thanks it was very useful. I used the google plugin as suggested by you. It's working absolutely fine.
June 28 2019
Domantas, WP Sitemap Page is only supported up to 4.9.10 as of this writing. What other plugins would you recommend?
September 24 2019
Hey Aaron, WP Sitmap Page creators updated the plugin. THere should not be any problems running it on latest WordPress version (WordPress 5.2.3)
July 29 2019
August 25 2019
does sitemap help in google ranking
September 24 2019
Hey Satendra Kumar, Not directly. Sitemap.xml helps Google to discover what pages you have and index them.
October 23 2019
This very informative. Glad you share
April 19 2020
Hey Domantas G., Your article helped me a lot as I am a newbie without any technical expertise. Your article was very simple and illustrative. I submitted my .xml and .html sitemaps easily in a hassle-free way. Thank you for the article.
June 03 2020
Thank you so much. That was really helpful...
June 15 2020
Thanks for your work
June 29 2020
Thanks for the blog, You have illustrated everything very well. I had Yoast plugin installed but never tried xml sitemap.
July 07 2020
Thanks this is very informative
August 17 2020
I installed the Yoast SEO plugin to my wordpress site but couldn't find XML Sitemaps under Setting. can you please advise?
November 06 2020
Hey there Ted! :) I can't fully check your issue through the comments section, but if you are hosting with us, please message your Customer Success team and I am sure you will get help asap! :)
September 02 2020
A bit of digging has found a solution to the failure of my sitemap to load: I just had to re-save my permalink settings.
September 12 2020
Very helpful thanks very much, it worked
November 11 2020
Hey there. Happy to hear it helped.
October 19 2020
Have used both XML and HTML sitemaps. Is there an application where I can trace page links to draw out a Map of Pages and also check broken links?
February 02 2021
Hi, Robert! You can find and fix all of your broken links following this article.
November 22 2020
Thanks very much, really helped! Been using Yoast