How to Create an XML Sitemap in WordPress

WordPress XML Sitemap

A sitemap is really important. Google also recommends every website have a sitemap for better indexing. A sitemap is a small XML file that contains data of each URL of your website. Google or any other search engine scan sitemap, fetch all the URLs added to the sitemap, and index. Adding a sitemap may improve your website’s visibility in search. This is the reason all the SEO guys recommend having a sitemap on your website.

There are mainly two types of sitemaps: XML sitemap and HTML sitemap. The XML sitemap is used by search engines while the HTML sitemaps are for humans to find out new URLs to navigate. People don’t often use HTML sitemaps. But it is important to have XML sitemaps to improve your website’s visibility in search engines.

Best Managed WordPress Hosting

WPEngine is the best and most secure managed hosting provider

If your website is built on WordPress, there are multiple ways you can create a sitemap. In this detailed guide, I will explain how you can create an XML sitemap in WordPress.

How to Create an XML Sitemap

There are several plugins that create an XML sitemap. So, you do not need to put much effort. Most of the good XML sitemap plugins are free to download and use. Let’s talk about a few good XML sitemap plutons.

Yoast SEO

Yoast isn’t exactly a sitemap plugin. Most people know it as a good SEO plugin. I personally use the Yoast plugin for the on-page SEO of my blog. Another advent of Yoast is its built-in sitemap generates tool. This plugin automatically generates an XML sitemap of your website.

If you have the Yoast plugin installed, go to SEO > General on your WordPress left sidebar. Now in the Features tab, find the toggle for XML sitemaps. Enable this toggle and the plugin will create a sitemap of posts, pages, and images.

Yoast SEO sitemap WordPress

To see the sitemap of your website, click on the question mark next to the label saying “XML sitemap.” Click on the link “See the XML sitemap.”

Similarly, other SEO plugins like RankMath and AISSEO also offer built-in sitemap generators. These plugins are plaid, so I am not going into details. If you use any other paid or free SEO plugin, make sure to check all the options it has. Most SEO plugins offer the sitemap generator tool.

XML Sitemaps

XML Sitemaps is an old plugin for creating a sitemap in WordPress. The plugin is extremely popular and lets users create a sitemap. Once installed, it adds a dedicated section to the dashboard. Go to Settings > XML-Sitemap to access the plugin options.

WordPress XML Sitemaps

You will several options to customize the sitemap. There is also an option to automatically notify search engines like Bing or Google when it adds a new URL into the sitemap. You can also exclude a post or page from the sitemap if you want.

This plugin is free to download and use on your personal or commercial site.

Download Plugin

Can you create an XML Sitemap without a plugin?

If you do not want to use a plugin, you can manually create a sitemap using online tools or any other script. Then you can upload it to your website’s root using CPanel or FTP/SFTP.

Here are some online tools for creating sitemaps

  • XML-Sitemaps.com
  • Sitemaps.org

The issue with this method is that you need to create a new sitemap each time you publish a new blog post and upload the new sitemap. So, it isn’t the recommended way. If you are using the plugin, you don’t need to think about updating sitemaps.

How to submit a sitemap to search engines?

Robotx.txt

Once you have created the sitemap of your website, it is also your responsibility to submit it to search engines. This is a one-time process to tell Google the URL of your website’s sitemap.

First of all, add it to your website’s robots.txt file. All major search engines follow the Robots.txt file.

Simply add this line in the Robots.txt file.

Sitemap: http://www.example.com/sitemap.xml

Replace example.com with your own domain.

Robots.txt can be founded at the root of your website. If there is no Robots.txt file in the root directory, Create one.

Submit to Google via Google Search Console

Sign up to Google Search Console using your existing Google account, create a property of your website and verify your domain. After this, you can submit your sitemap. Search Console is a nice tool that Google uses to communicate and tell if there’s an issue with your website.

Submit to Google via Google Search Console

Once you have verified your website on Google Search Console, you can go to Sitemaps in the left side bar and add the sitemap URL. Google will start checking your sitemap for new URLs to index.

Submit to Bing using Bing’s Webmasters tools

Bing also has Webmasters tools where website owners can verify their website and submit Sitemaps. You need to first sign up and verify the domain to confirm you are the owner. Bing Webmaster Tools is similar to Google Search Console.

Submit to Bing using Bing’s Webmasters tools

Then select the website, go to Sitemaps in the left sidebar and click Submit Sitemap button. Once you submit the sitemap, Bing will start fetching your sitemap from time to time for new URLs.

Wrap Up

Now you know how to create a WordPress sitemap. If you are already using a good SEO plugin, you do not need to download any other plugin for the sitemap. SEO plugins mostly offer a sitemap feature. Now you just need to submit the sitemap to Google and other search engines.

A sitemap is really important in SEO. So, you should not ignore it.

Tags: |

Deepanker Verma is an experienced WordPress developer who has been working on WordPress for more than 12 years. On TheWPGuides, he writes about WordPress, WordPress development, and WordPress plugins.


Similar Articles

0 Comments

Leave a comment

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.

© 2022 The WP Guides Developed By Deepanker