How to Generate an XML Sitemap for a WordPress Site

This WordPress tutorial teaches you how to create an XML Sitemap in WordPress and submit it to Google Search Console.

After submitting your WordPress URL to Google search engine, the next thing you need to take care is to create an XML Sitemap for your website. The good thing is that in WordPress, there are several plugins using which you can submit an XML Sitemap to the Webmaster tools like Google and Bing.

What is an XML Sitemap?

An XML Sitemap contains the list of all the pages and posts inside your Website and by submitting it to different webmaster tools, search engines will know about all the web pages on your site and helps in better crawling and faster indexing of your website. If you have a new website or blog, Sitemaps helps your website get found on the search engine as it is a great planning tool for Search Engine Optimization (SEO).

I will advise you to take a look at the important article on why you should build a sitemap even before designing your website.
As a WordPress user, you don’t need any coding knowledge to create a sitemap file. There are so many plugins that allow you to generate Sitemap for your WordPress site and then submit it to google search console

Create Sitemap in WordPress using Yoast SEO Plugin

  • To generate a sitemap, you need to install and activate WordPress Yoast SEO Plugin.
  • Now, on your WordPress Dashboard, you’ll see the Yoast SEO option. Hover over it and go to XML Sitemaps.
XML sitemap

  • On the next screen under XML Sitemaps – Yoast SEO, change the XML Sitemap functionality from Disabled to Enabled. It will show you different Settings to configure for your Sitemaps. You can select post types you want to include in your sitemap and exclude posts which you don’t want to add to your sitemap. If you are not sure what to do with the settings, just ignore all the fields.
generate sitemap in WordPress using Yoast plugin

  • Finally, click the Save Changes button at the bottom.

Now, the plugin will automatically generate the Sitemap for your WordPress website. You can access your sitemap page by clicking on the XML Sitemap button. Or you can simply add the URL sitemap_index.xml after your domain name to view the Sitemap page.

Access your sitemap –

Read Also: How to add Google Analytics to WordPress

Submit the Sitemap to Google Search Console

After generating the sitemap for WordPress, the next thing you need to do is to tell Google about your Sitemap URL. You can do so by using Google Webmaster tool.

I am assuming you have submitted your property to google webmaster tools and verified your site successfully. If not, complete this step first using the link provided at the top of this article and then proceed.

  • On google webmaster tools, select the property for which you want to add the sitemap URL.
  • On the left side, you’ll see the dashboard, go to Crawl > Sitemaps.

sitemap google search console

  • Click on ADD/TEST Sitemap button at the top and enter your Website’s Sitemap URL. i.e sitemps_index.xml.
add sitemap to google

  • Hit the Submit button. The sitemap will be added successfully.

Your sitemap status will be shown as pending in the beginning. Google will take time to show your indexed stats on google webmaster tool. Google will fetch your page URL and could take over a few weeks time before start displaying the stats as shown in below screenshot.

Sitemap Submitted for your WordPress site

Read Also: Best way to delete WordPress theme

If you have any doubts or queries regarding generating XML sitemap in WordPress and submitting the Sitemap to Google, feel free to ask in the comments section below.

Share this article with your Facebook friends, twitter and google plus followers.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.