XML sitemap is a feature every WordPress website owner knows they need to have, but they need to understand what it is or is suitable for.
Although sitemaps are vital in increasing your chances of ranking higher on search engines, new WordPress users often dismiss them because they think it’s a complex process to generate them.
This article will show you how to create XML sitemaps using the most popular WordPress SEO plugins: Yoast, All in One, and RankMath.
What Are XML Sitemaps?
XML sitemaps are essential for web admins to help search engines crawl and index their websites efficiently.
They are files to help understand the structure and content of your website, making it easier for search engines to discover and index your web pages.
Here are some of the many benefits of generating a sitemap:
- Improved Search Engine Visibility: provide a list of all the essential pages on your website. When you submit this file to search engines, it helps them find and index your content. As a result, your pages are more likely to appear in search results for relevant keywords.
- Indexing Efficiency: Some pages may be invisible without a sitemap, especially with limited internal links. XML sitemaps ensure that no valuable content goes unnoticed.
- Priority and Frequency: In an XML sitemap, you can specify each page’s priority and update frequency. This helps search engines understand which pages are more important and how often they should revisit them for updates.
- Handling Large Websites: If your website is large with many pages, a sitemap makes it easier for search engines to navigate through your content. This is especially useful for e-commerce sites, blogs, news websites, and any site with a lot of content.
- Mobile and Alternate Versions: XML sitemaps can also include information about mobile versions of your pages or alternate language versions to correctly index and display the appropriate version of your content to users.
- Error Detection: Sitemaps can include information about any errors encountered while crawling your site. This helps you quickly identify and fix issues like broken links, missing pages, or server errors.
- Historical Data: Some sitemaps can include information about when each page was last updated. This can be useful for both search engines and users to understand the freshness of your content.
- Better User Experience: While XML sitemaps are primarily for search engines, they indirectly benefit users too. When your content is more easily discovered and indexed, it becomes more accessible to people searching for information, products, or services you offer.
Now that you understand the use and importance of sitemaps, let’s learn how to create them in different ways.
How to Generate XML Sitemap with the Yoast Plugin
Yoast is one of the most popular WordPress SEO plugins used by millions.

It’s easy to use, has many features, and is well-coded.
By default, Yoast will create an XML file after activating it for the first time, and you can view it using this link:
https://sample.com/sitemap_index.xml
Make sure to replace sample.com with your actual domain name.
If you can’t access the sitemap, it’s easy to make it yourself.
Follow these steps to generate XML sitemaps with Yoast quickly:
-
Activate the Yoast SEO plugin.
-
Navigate into the Settings -> General -> Site features screen and scroll to the bottom of the page to the APIs section. -
Enable the XML feature by turning the toggle on.
-
Click on the View the XML sitemap button to visit its page.
Once the sitemap page loaded successfully, click the different links to ensure it works properly.

Yoast is one of many great SEO plugins. Keep reading if you use a different one, such as AIOSEO or RankMath.
How to Generate XML Sitemap with the All-In-One SEO Plugin
Like the other SEO plugins, the All-In-One plugin will generate an XML sitemap page by default after activating it, and you can find it here:
https://sample.com/sitemap.xml
Again, please replace sample.com with your actual domain name.
If you can’t see the page or it doesn’t exist, create the XML sitemaps yourself.
Follow the steps below to generate an XML sitemap with the All-In-One SEO plugin:
- Activate the AIOSEO plugin.
- Navigate to All-In-One -> Sitemaps screen.
- Enable the sitemap feature and click on the Save Changes button.
- Click on the Open Sitemap button to visit the sitemap page.
The sitemap page will be populated with links to your pages, posts, custom post types, and taxonomies.

If RankMath is the SEO plugin of your choice rather than AIO, read the following section.
How to Generate XML Sitemap with the Rank Math Plugin
Rank Math is another powerful SEO plugin for WordPress. Like the other two above, this also enables the sitemap feature by default.

To view the XML sitemap page made by Rank Math, follow this link:
https://sample.com/sitemap_index.xml
Remember to replace the sample.com with your actual domain name.
You can also use Rank Math to create the sitemap page yourself by following these steps:
- Activate the RankMath SEO.
- Navigate to Rank Math SEO -> Dashboard tab, and scroll to the bottom of the screen.
- Enable the Sitemap feature to be on.
- Optional: if you want to change the default sitemap configuration, click the Setting button to access its options (out of the scope of the article).
In addition, I highly recommend you enable the breadcrumbs option as well.
Like the Yoast and AIO plugins, this XML sitemap page will also be filled with structural links to your website.

The three SEO plugins we covered above have the sitemap as an option out of many others. Use an SEO plugin to improve all aspects of your website, like content, images, link building, and more.
However, check the few options below if you only want to add a sitemap to your website without using a full-blown SEO plugin.
Dedicated XML Sitemaps Plugins
There are many tactics and strategies to improve the SEO of a website, and the plugins above will tackle it from every possible angle.
However, those plugins may be overwhelming if you only want to add a simple XML sitemap to your WordPress website.
Instead, you can install simpler plugins that will do this task only. In this section, we will explore a couple of the options.
XML Sitemap Generator for Google
This plugin will generate a sitemap page for your website with various links to the different pages.

By default, activating the plugin will create the sitemap page, and you’re not required to take any further actions.
However, you can access its Settings page to modify and control which pages will be linked.
For example, if you want to add custom post-type pages to your sitemap, navigate to Settings -> XML-Sitemap and enable the box under the content section.

After updating the options, visit your sitemap page by adding sitemap.xml to your domain name.
WP Sitemap Page
The WP Sitemap Page is another excellent option to choose from.

The significant advantage of this plugin is the option to name your sitemap page however you prefer.
Once you activate the plugin, please create a new page for your website and name it Sitemap (or any other name).
Then, add the [wp_sitemap_page] shortcode into the page builder or Gutenberg shortcode block, and click publish.

Then, visit the new sitemap page to ensure the shortcode generated the content.

You can also modify the default output to add or exclude links from your XML sitemap from the Settings -> WP Sitemap Page screen.
Remember to save the changes and revisit the page to verify that the changes are in effect.
Submit the Sitemap to Google
Sitemaps are vital for every website, but generating them is only the first step out of two.
To maximize the benefit of the XML sitemaps, you’ll need to submit and notify Google about it.
First, navigate to Google Search Console to access your search console’s dashboard.
If you still need to, follow the video below and add your website as a new property.
Once you added and verified your domain name, click on the Sitemaps option in your dashboard.
Then, enter your sitemap URL address into the XML Sitemap field and click Submit.

Google will crawl the sitemap URL and will indicate if there are any issues accessing any of the links.
In addition, I recommend you add a link to the sitemap page by editing your site’s footer to be accessible for humans as well.
Conclusion
Ranking high on search engines is an evolving process involving many variables and tactics.
XML sitemaps are one of the most critical components that every website owner should prioritize. It guarantees every page on your website will be noticed and crawled.
This article showed you how to add an XML sitemap to your website and submit it to Google afterward.
Also, make sure to subscribe to our YouTube channel and like our page on Facebook.
this is a test from p4w