How to Easily Create an XML Sitemap in WordPress [Beginner Guide]

Are you looking for a way to create an XML sitemap in WordPress?

Sitemaps make it a lot easier for search engines to crawl and index your website. Consider these to be road maps for search engine bots. They’re also crucial for search engine optimization (SEO).

In this post, we will explain what an XML sitemap is and why you need them. And then explain how to easily create an XML sitemap in WordPress.

What is an XML Sitemap?

An XML sitemap is a file that describes all of your website’s content in an XML format, making it easy for search engines like Google to find and index it.

In the early 2000s, government websites included a “Sitemap” link on their main pages. This page usually included a listing of all the pages on that website.

While some websites still use HTML sitemaps today.

Sitemaps are now published in XML format rather than HTML, and their primary audience is search engines rather than people.

An XML sitemap is a means for website owners to inform search engines about all of the pages on their website.

It also signals search engines which links on your site are more valuable than others and how regularly you update them.

While XML sitemaps will not improve your search engine rankings, they will help search engines crawl your website more efficiently. This means they may find more content and start showing it in search results, resulting in more search traffic and higher SEO rankings.

Why Do You Need an XML Sitemap?

Sitemaps are crucial from a search engine optimization (SEO) point of view.

Adding a sitemap to your website has no impact on your search engine results. However, if you have a page on your site that isn’t indexed, a sitemap is a good way to let search engines know.

Sitemaps are highly valuable when you start a blog or create a new website because most new websites do not have any backlinks. This makes it difficult for search engines to find all of your content.

This is why Google and Bing both allow new website owners to submit a sitemap using their webmaster tools. This makes it simple for their search engine bots to find and index your content.

That being said, let’s look into how to create an XML sitemap in WordPress.

How to Create a WordPress XML Sitemap

Until WordPress 5.4, WordPress didn’t have built-in sitemaps. However, WordPress 5.5 included a simple XML sitemap feature.

This helps you automatically create an XML sitemap in WordPress without using a plugin. Simply add wp-sitemap.xml to the end of your domain name, and WordPress will show the default XML sitemap.

This XML sitemap functionality was added to WordPress so that every new WordPress website may take advantage of the SEO benefits of an XML sitemap.

However, it is not flexible, and you cannot easily control what you add or remove from your XML sitemaps.

As a result, when creating a sitemap in WordPress, we recommend using a plugin.

Fortunately, almost every top WordPress SEO plugins come with its sitemap feature. These sitemaps are more powerful, and you have more control over which content to include or remove from your WordPress XML sitemaps.

Create an XML Sitemap in WordPress Using All in One SEO (AIOSEO)

Using the All in One SEO plugin is the easiest way to create an XML sitemap in WordPress.

It is the top WordPress SEO plugin available, with a comprehensive set of features to help you optimize your blog posts for SEO.

First, go to Plugins from your dashboard and click Add New. Now search All in One SEO in the search bar and click Install Now.

Install All in One SEO Plugin

After installing the plugin, click Activate, and you should see an SEO option on your site’s dashboard.

All in One SEO is enabled sitemap for you by default. However, to double-check that the sitemap is enabled, go to the All in One SEO » Sitemaps from your WordPress dashboard.

Then, look for the Enable Sitemap option and check that the button is toggled On.

Enable Sitemap in All in One SEO

Now you can check your website sitemap by simply clicking on the Open Sitemap button.

Open Sitemap in All in One SEO

After you click the button, you’ll be sent to a sitemap index page.

By default, All in One SEO will automatically create sitemaps for your posts, pages, and categories. And if you have an online store, such as a WooCommerce store, or products listed, it will create a sitemap for them as well.

You can also view or test your sitemap manually. To do so, go to the URL of your website and add sitemap.xml to the end.

For example., your URL should look like this: https://www.yourdomain.com/sitemap.xml.

Now that your XML sitemap is ready, it will automatically send all new updates to Google and Bing.

Customizing Your Sitemap

After checking your sitemap is enabled and knowing how to view your sitemap, let’s look at some settings you can configure.

First, you can decide whether or not your sitemap should have an index page.

This setting is recommended for sitemaps containing more than 1000 URLs. So, if you have a small site with less than a hundred URLs, you may disable this setting.

To do so, navigate to All in One SEO » Sitemaps and set the Enable Sitemap Indexes button to Disabled.

Enable Sitemap Indexes in All in One SEO

If you’re not sure, leave it enabled.

Next, you can set the Links Per Sitemap setting. However, we recommend that most users leave this setting untouched.

Links Per Sitemap Option in All in One SEO

You can also decide which content should be included in your sitemap. By leaving the options checked, you can include all Post Types and Taxonomies.

Post Types and Taxonomies Option in All in One SEO

However, If you uncheck these boxes, a list of all the different post types and taxonomies will show.

Post Types and Taxonomies Options for XML Sitemap

Then, check the individual boxes to decide the content you want to include in your sitemap.

Lastly, you can decide whether to include Date Archives and Author Archives in your sitemap by enabling or disabling the options below:

Date Archive And Author Option in All in One SEO

WordPress automatically creates these when you publish new posts on your site.

However, we recommend leaving these options disabled because they don’t have much value in search results.

That’s it! You can create your XML sitemap for your WordPress website using All in one SEO.

Create an XML Sitemap in WordPress Using Yoast SEO

If you use Yoast SEO as your WordPress SEO plugin, it will automatically enable XML sitemaps for you.

First, go to Plugins from your dashboard and click Add New. Now search Yoast SEO in the search bar and click Install Now.

Install Yoast SEO Plugin

After installing the plugin, click Activate, and you should see an SEO option on your site’s dashboard.

After activation, navigate to the SEO » General page and switch to the Features tab. You must go down to the XML Sitemap option and ensure that it is Enabled.

Yoast SEO XML Sitemap Option

To check that Yoast SEO has generated an XML Sitemap, click the question mark icon next to the XML Sitemap option on the page.

Then, click the See the XML Sitemap link to see your live XML sitemap created by Yoast SEO.

You can also manually view your sitemap. To do that, visit your website URL and add sitemap_index.xml at the end.

For example, your URL should look like this: https://www.yourdomain.com/sitemap_index.xml.

How to Submit WordPress XML Sitemap to Search Engines?

After creating a WordPress sitemap, submit it to search engines such as Google and Bing so that it may be indexed. While search engines will continue to index websites without manual submission, submitting WordPress XML sitemaps to search engines will bring the following benefits:

  • SEO: Sitemaps tell search engines when there are updates or new content, which helps your website stay updated in search engine rankings.
  • Accuracy: With WordPress sitemap, a search engine will only index the most accurate and relevant information about a site.
  • Free: There is no cost for creating a WordPress sitemap, regardless of the method.
  • Organic traffic: Increase the number of visitors by ranking higher in the SERPs.

Submitting Your XML Sitemap to Google

Google Search Console (GSC) is a free Google tool that allows website owners to monitor and manage their site visibility in Google search results.

Adding your sitemap to Google Search Console allows it to easily find your content, even if your website is completely new.

To start, go to the Google Search Console website and signup for an account.

Following that, you will be asked to select a property type. You can select either a domain or a URL prefix. We suggest using a URL prefix because it is easy to set up.

Select Property Type In Google Search Console

Type your website’s URL and then click on the continue button.

Next, you will be asked to confirm ownership of the website. There are various ways to do that, but we recommend using the HTML tag method.

Verify Ownership in Google Search Console

Simply copy the code from the screen and navigate to the WordPress admin area.

If you use AIOSEO, it comes with simple webmaster tools verification. Simply navigate to All in One SEO » General Settings and select the Webmaster Tools option. After that, you can paste the Google code there.

All in One SEO Site Verification

If you are not using AIOSEO, you must install and activate the Insert Headers and Footers plugin.

After activation, go to Settings » Insert Headers and Footers page and paste the code you copied previously into the Scripts in Header box.

Add Verification Code in Insert Headers and Footers Plugin

Save your changes by clicking on the Save button.

Now, return to the Google Search Console tab and click the Verify button.

Google will examine for verification code on your website and add it to your Google Search Console account.

Now that you’ve added your website, it’s time to add your XML sitemap.

From your GSC account dashboard, click on Sitemaps from the left column.

Next, you need to add the last part of your sitemap URL under the Add new sitemap section and click the Submit button.

Add Sitemap to Google Search Console

Google will now add your sitemap URL to your Google Search Console.

It will take a bit of time for Google to crawl your site. After some time, you should be able to get basic sitemap data.

This data includes the number of links discovered in your sitemap, how many of them were indexed, the image-to-webpage ratio, and more.

Submitting Your XML Sitemap to Bing

Like Google Search Console, Bing provides Bing Webmaster Tools to help website owners monitor their website’s performance in the Bing search engine.

To submit your sitemap to Bing, go to Bing Webmaster Tools. Here, You’ll see two options for adding your site. You can manually add your site or import it from Google Search Console.

Adding Your Site to Bing

If you’ve previously added your site to Google Search Console, we recommend importing it. It saves you time by automatically importing your sitemap.

If you choose to add your site manually, you need to enter your site’s URL and then verify the site.

Next, bing will ask you to confirm ownership of the website and show you several methods to do that.

We recommend using the HTML tag method. Simply copy the meta tag line from the page and navigate to the WordPress admin area.

Copy Meta Tag to Verify Site in Bing Webmaster Tool

Now, you can install and activate the Insert Headers and Footers plugin.

After activation, go to Settings » Insert Headers and Footers page and paste the code you copied previously into the Scripts in Header box.

Add Bing Verification Code in Insert Headers and Footers Plugin

Save your changes by clicking on the Save button.

Start Using Sitemaps for WordPress Today

An XML sitemap is something that every WordPress website needs. While it will not rocket your site to the top of the SERPs, it is an excellent way to get your site crawled faster and more thoroughly. The simplest way to create an XML sitemap on WordPress is to use a plugin like All in One SEO or Yoast SEO, but there are plenty of other plugins available to help you.

And once you’ve created your sitemap, you should submit it to Google Search Console to learn more about how Google indexes your site.

We hope this post answered all of your questions regarding XML sitemaps and how to create an XML sitemap in WordPress. If you like this post, then read more posts like this on our website.