Are you wondering what is an XML sitemap, and how to add it to your WordPress website?
An XML sitemap helps search engines easily navigate through your website content. It gives them a list of all your content in a machine-readable format.
Unlike a regular sitemap that is made for people, an XML sitemap is not typically visible to your website visitors.
In this article, we will explain what is an XML sitemap, and how to easily create a sitemap in WordPress.
What is an XML Sitemap?
An XML sitemap is a file that lists of all your website content in an XML format, so search engines like Google can easily discover and index your content.
Back in the early 2000s, government websites used to have a link on their main pages, titled “Sitemap”. This page usually contained a list of all the pages on that website.
While some websites still have HTML sitemaps today, overall the usage of sitemaps have evolved.
Today sitemaps are published in an XML format instead of HTML, and their target audience is search engines and not people.
Basically, an XML sitemap is a way for website owners to tell search engines about all the pages that exist on their website.
It also tells search engines which links on your website are more important than others, and how frequently you update your website.
While XML sitemaps will not boost your search engine rankings, they allow search engines to better crawl your website. This means they can find more content and start showing it in search results thus resulting in higher rankings sometimes.
Why You Need an XML Sitemap?
Sitemaps are extremely important from a search engine optimization (SEO) point of view.
Simply adding a sitemap does not affect search rankings. However, if there is a page on your site that is not indexed, then sitemap provides you a way to let search engines know about that page.
Sitemaps are extremely useful for when you first start a blog or create a new website because most new websites don’t have any backlinks. This makes it harder for search engines to discover all of their content.
This is why search engines like Google and Bing allow new website owners to submit a sitemap in their webmaster tools. This allows their search engine bots to easily discover and index your content (more on this later).
Sitemaps are equally as important for established popular websites as well. They allow you to highlight which part of your websites are more important, which parts are more frequently updated, etc, so search engines can visit and index your content accordingly.
This helps improve the overall visibility of your website in search engine rankings.
How to create a Sitemap in WordPress?
There are several ways to create an XML sitemap in WordPress. We will show you two popular methods to create an XML sitemap in WordPress, and you can choose one that works best for you.
Method 1. Creating an XML Sitemap in WordPress using Yoast SEO
The easiest way to create an XML sitemap in WordPress is by using the Yoast SEO plugin.
Upon activation, go to SEO » General page and switch to the ‘Features’ tab. From here, you need to scroll down to the ‘XML Sitemap’ option and make sure that it is turned on.
Next, click on the save changes button to store your changes.
To verify that Yoast SEO has created an XML Sitemap, you can click on the question mark icon next to the XML Sitemap option on the page.
After that, click on the ‘See the XML Sitemap’ link to view your live XML sitemap generated by Yoast SEO.
You can also find your XML sitemap by simply adding sitemap_index.xml at the end of your website address. For example:
Yoast SEO creates multiple sitemaps for different types of content. By default, it will generate sitemaps for posts, pages, author, and categories.
However, when it comes to submitting the sitemap to search engines, you’ll only need to submit the main sitemap index file. We’ll show you how to do that later in this article.
Method 2. Creating an XML Sitemap in WordPress using Google XML Sitemaps Plugin
This method is recommended for users who don’t want to use Yoast SEO’s XML Sitemaps feature.
Upon activation, the plugin automatically generates an XML Sitemap for your website. You can view it by simply adding sitemap.xml to your website’s address. For example:
The plugin works out of the box for most blogs and business websites. However, you still need to review plugin settings to make sure that you are not missing anything.
Simply, go to Settings » XML-Sitemap page to configure plugin.
At the top, the plugin will give you status information. It will notify you if the plugin is unable to ping any search engine.
You can review the basic options where you can disable the plugin from notifying search engines, increase PHP memory limit, and more. The default settings would work for most WordPress hosting environments.
Next, you’ll see the additional pages section. From here you can manually add pages to your XML sitemap. This comes in handy if your website has static HTML pages not created by the WordPress CMS.
After that, you can adjust how the plugin assigns priority to posts. By default, it uses the number of comments to calculate a post’s priority.
The next two sections of the plugin’s settings page allow you to include and exclude content from your WordPress sitemap. For example, if you run an eCommerce store, then you would want to include the ‘Products’ content type to your sitemap.
After that, you can adjust the frequency and priority of your sitemap contents. Changing these values are considered as a hint by search engines, and they may choose to follow or ignore these tags based on their criteria.
Finally, don’t forget to click on the ‘Update Options’ button to save your changes.
How to Tell Search Engines About Sitemaps?
Search engines are quite smart in finding a sitemap. Whenever you publish new content, a ping is sent to Google and Bing to inform them about changes in your sitemap.
However, we recommend that you submit the sitemap manually to ensure that search engines can find it.
Submitting Your XML Sitemap to Google
Google Search Console is a free tool offered by Google to help website owners monitor and maintain their site’s presence in Google search results.
Adding your sitemap to Google Search Console helps it quickly discover your content even if your website is brand new.
First, you need to visit the Google Search Console website and sign up for an account.
After that, you will be asked to select a property type. You can choose a domain or a URL prefix. We recommend choosing URL prefix as it is easier to setup.
Enter your website’s URL and then click on the continue button.
Next, you will be asked to verify ownership of the website. You will see multiple methods to do that, we recommend using the HTML tag method.
Simply copy the code on the screen and then go to the admin area of your WordPress website.
Upon activation, you need to visit Settings » Insert Headers and Footers page and add the code you copied earlier in the ‘Scripts in Header’ box.
Don’t forget to click on the save button to store your changes.
Now, switch back to the Google Search Console tab and click on the ‘Verify’ button.
Google will check for verification code on your site and then add it to your Google Search Console account.
Note: if the verification is unsuccessful, then please make sure to clear your cache and then try again.
Now that you have added your website, let’s add your XML sitemap as well.
From your account dashboard, you need to click on the Sitemaps from the left column.
After that, you need to add the last part of your sitemap URL under the ‘Add new sitemap’ section and click the Submit button.
Google will now add your sitemap URL to your Google Search Console.
It will take Google some time to crawl your website. After a while, you would be able to see basic sitemap stats.
This information includes the number of links Google found in your sitemap, how many of them got indexed, a ratio of images to web pages, and more.
Submitting Your XML Sitemap to Bing
Similar to Google Search Console, Bing also offers Bing Webmaster Tools to help website owners monitor their website in the Bing search engine.
To add your sitemap to Bing, you need to visit the Bing Webmaster Tools website and sign up for an account. Once you have signed up, you can add your website under the ‘Add new site’ section.
On the next screen, you will be asked to enter your website details including the sitemap URL.
Click on the Submit button to continue.
Bing will now ask you to verify the ownership of your website and will show you several methods to do that.
We recommend using the Meta tag method. Simply copy the meta tag line from the page and paste it on a blank text file on your computer.
Now go to your WordPress website and install and activate the Insert Headers and Footers plugin to your website.
Upon activation, you need to visit Settings » Insert Headers and Footers page and add the code you copied earlier in the ‘Scripts in header’ box.
Don’t forget to click on the Save button to store your changes.
How to Utilize XML Sitemaps for Your Website?
Now that you have submitted the XML sitemap to Google, let’s take a look at how to utilize it for your website.
First, you need to keep in mind that the XML sitemap does not improve your search rankings. However, it does help search engines find content, adjust crawl rate, and improve your website’s visibility in search engines.
You need to keep an eye on your sitemap stats in Google Search Console. It can show you crawl errors and the pages excluded from search coverage.
Below the charts, you can click on the tables to view actual URLs excluded or not indexed by Google.
Normally, Google may decide to skip duplicate content, pages with no content or very little content, and pages excluded by your website’s robots.txt file or meta tags.
However, if you have an unusually high number of excluded pages, then you may want to check your SEO plugin settings to make sure that you are not blocking any content.
We hope this article helped answer all your questions about XML sitemaps and how to create an XML sitemap for your WordPress site. You may also want to see our guide on how to quickly increase your website traffic with these actionable tips.
The post What is an XML Sitemap? How to Create a Sitemap in WordPress? appeared first on WPBeginner.