What is an XML Sitemap? How to Create a Sitemap in WordPress?
The importance of an XML sitemap to every website owner cannot be overemphasized. An XML sitemap help search engines to discover and navigate through websites and blogs easily. On our website we have the sitemap here and the sitemap is generated by using the Yoast SEO plugin for WordPress. Every time we publish a new blog post the sitemap will be updated automatically. Because we have linked our website to Google search console Google get announced about our latest post and we basically ask them to index our post.
What is an XML Sitemap?
An XML sitemap is a file that lists all of a website’s content, including posts and pages in an XML format. This is done to enable search engine crawlers that index websites to SERPs to discover these contents easily. In the above screenshot you see our website and you see it has 4 categories. Depending on the structure of your WordPress website you can have many different categories. Sometimes you don’t want to let Google index all your content. In our case we only want or blog posts, general pages, blog categories and our documentation being indexed. Each category has its own sitemap to go deeper in the website structure. In below example you see our blog posts.
XML is the most commonly used sitemap because website owners want to target search engines and not people. An XML sitemap is critical to a website’s success as it hugely impacts site traffic. This sitemap tells search engines about all existing pages on your website, prioritized links, and how frequently the website is updated.
XML sitemap also enables search engines to find more of your content and display them on search results thereby generating more search traffic and improving SEO rankings.
How to Create a Sitemap in WordPress
There are two different approaches to create an XML sitemap in WordPress.
1. Creating an XML Sitemap without plugins
This is a very basic and straightforward approach only available to website owners using the WordPress 5.5 version. To create the sitemap follow these step.
- Add wp-sitemap.xml at the end of your domain name.
- WordPress will display the default XML sitemap.
A major problem with this approach is that the XML sitemap isn’t flexible. Thus you can’t easily control the contents you include or exclude from your sitemap. For better control of your content, the second approach is recommended.
2. Creating an XML Sitemap in WordPress using Yoast SEO plugins
Yoast SEO is an all-in-one SEO plugin. It is a WordPress SEO plugin that offers users a comprehensive set of tools to optimize pages SEO and add or remove content.
It is also the most popular and easiest option out there. To generate your sitemap follow these steps.
- Download, install and activate the Yoast SEO.
- Navigate to the WordPress dashboard, and click SEO -> General from the left-hand menu.
- Select the Features tab and scroll to XML Sitemaps.
- Toggle the bar to On and click on the Save Changes button to store your changes.
- Click on the question mark icon next to the XML Sitemap option on the page and then on the dedicated link to verify if your new XML Sitemap has been successfully created.
Download Yoast SEO here.
The final step for this method is to submit the sitemap to Google. You can do this by
- Verifying the website’s owner via Google Search Console.
- Once done, locate your website through Google Search Console
- Next, go to Index -> Sitemaps
- Input your WordPress sitemap URL and click Submit.
- Give Google a few days to process your submission and crawl your pages.
More information can be found here.
Every website owner wants their site to generate huge traffic. What better way to achieve this goal than with an XML sitemap. This sitemap allows search engines to easily discover website contents. It improves organic traffic and SEO rankings. What’s more, it is also easy to create.