How To create an XML Sitemap in WordPress Website

Before we learn how to create an XML sitemap lets talk about what is Sitemap.

Since I tried to make this website beginner-friendly we will start with the basics so let’s get started.

Table of Contents

What Is XML Sitemap

A sitemap is an XML file which informs the search engine about the pages and the URLs of a website that are available for crawling.

It also tells the search engine which part or link of your website is more important and how often you update it.

This allows search engine web crawlers like Googlebot to crawl and read the file of your website more intelligently.

But I would like to clear things regarding the indexing of pages. The search engine like Google will not index your page until :

1. They find and crawl them.

2. They consider them good enough to be worth indexing.

3. The sitemap does not boost the search ranking of a website it just improves the crawling and indexing of your website.

Having said that, by submitting an XML sitemap to search engine, you are giving clue that the pages in the XML sitemap are of a good quality landing page.

A Sitemap of a website looks similar to the below screenshot.

xml sitemap

Do I Need a Sitemap

From an SEO point of view, a sitemap is important. Particularly if your website meets one of the following criteria.

  • If your site is new: Most of the new blog/ website don’t get backlinks to their post, it becomes difficult for the search engine to discover all the posts and pages of the website.
  • If your site is really large: If your website is really large/ huge, its more likely search engine web crawls might overlook the newly updated or added pages of your website.
  • If your site has a large archive: If your website has a large archive and are isolated or not well linked to each other, you can list them in a sitemap to ensure that Google does not overlook some of your pages.

However, using sitemap does not guarantee that all the items in your sitemap will be crawled and indexed.

How To Create A Sitemap On WordPress Website

There are several ways to create an XML sitemap for WordPress website. But I will show you the easiest way.

At ElegantEspace, I have used the Yoast SEO plugin to create our sitemap. Since, it allows us to optimize our website along with other features like social integration, meta descriptions and much more.

To get started first of all you need to install and activate Yoast Seo Plugin.

Upon activation go to the dashboard of your WordPress admin panel click on SEO followed by General and enable the XML Sitemap button under Features tab. (As shown below)

yoast seo feature settings

Once you enable the functionality button, click on save changes. This way you can create your sitemap.

To view your sitmap_index.xml files click on the XML Sitemap question mark button on the same page (for reference see the above screenshot).

How To Tell Google About The Sitemap

You can submit your sitemap to Google by using Google Search Console To do so, first of all, go to Google Search Console and add the URL of your website.

Upon adding the URL you will be asked to verify the ownership of the website you were trying to add.

You will get two methods for site verification: Domain name and URL prefix. I recommend the URL prefix method because it is more flexible.

google console adding a website

Enter the URL of your website make sure you’re using the correct protocols.

Because Google considers an HTTP and HTTPS as two different protocols. It also considers and as two different websites.

Once you add your website you will get a few options to verify the ownership of the website you are adding.

You can go with the recommended method however, I suggest you go with the alternate method (This is the most reliable way).

To do so go to other verification methods followed by ‘HTML tag’. 

verify ownership in google search console

Now copy the verification key code* part (the value inside the content = “*“) then go to the WordPress admin panel and click on SEO followed by webmaster tools and paste the copied key code next to Google verification code (as shown in the screenshot).

setting of xml sitemap in yoast

After this step, go back to Google search console tools site verification screen and click on the verify button. Once the website is verified you will get a popup message “Ownership auto verified”.

Click on Done to see the dashboard of webmaster tools.

goggle search console success message

To add an XML sitemap to Google Search Console follow the below steps

  1. Go to Google Search Console
  2. Click on website URL
  3. Go to sitemap option
  4. Once you click on sitemap you will get an option of Add sitemap, click on that.
  5. Paste “sitemap_index.xml”
  6. Submit
console sitemap

Once you successfully submit sitemap it will take few hours to crawl your website.

After a while, it will start showing you the number of links it found, how many of them got indexed and stats of your website.

As your site gets older you will start seeing more and more data which will help you how well your site is performing and what else you can do to improves your site performance for the search engine.

I hope this article was able to clear your doubt regarding XML sitemap and helped you with installation steps.

Further Readings

How to enable Google Adsense for a website

How to make money online

Why 99% of bloggers fail

Frequently asked questions

A search engine like Google uses an advanced algorithm to rank the web pages for their searchers.

But those algorithms still need your help to understand and rank the content of your web page properly.

If your content is not optimized, then the search engine will fail to rank your website and it won’t appear in the search result…

…because of this, you will miss out all the traffic related to your webpage.

So it is really important to do SEO for your website.

7 thoughts on “How to create an XML Sitemap in WordPress”

Comments are closed.

Share on facebook
Share on twitter
Share on whatsapp
Share on linkedin
Share on pinterest

Sign up for our Newsletter


Award winning hosting company for your website


Best page builder for creating a stunning website


The fastest growing and the first choice of a webmasters