A well-structured website is essential to rank well on Google. Yet many sites neglect one fundamental element: the XML sitemap. This file plays a key role in page indexing and makes search engines’ work easier by giving them a reading map of the website.
In this article, we explore the importance of XML sitemaps for SEO, and how to create, optimise and submit one to Google to ensure better visibility in search results.
What is an XML sitemap?
Definition and purpose
An XML sitemap is a structured file that lists all the URLs of a website. It acts as a guide for the robots of search engines such as Google, Bing or Yahoo, helping them crawl, understand and index a site’s pages efficiently. The file is written in XML (Extensible Markup Language), a structured language that lets search engine crawlers interpret its content easily.
Unlike an HTML sitemap, which is aimed at human visitors and offers them simplified navigation, the XML sitemap is designed specifically for search engine robots.
Why is it important?
Using an XML sitemap is essential for several reasons:
- Makes crawl budget go further: It guides search engines towards the important pages and ensures efficient crawling of every page and URL on the website.
- Speeds up indexing: It gets new pages, updates and deep content that might otherwise be hard to discover picked up faster.
- Optimises search visibility: It structures the content, ranks information by hierarchy and gives search engines hints about the relevance of URLs.
- Improves error management: It lets you quickly detect broken or unindexed URLs and act on them using tools such as Google Search Console.
- A must for large sites: For e-commerce sites, news sites or platforms with thousands of pages, an XML sitemap is a major asset for good indexing.
XML sitemap vs HTML sitemap
There are two types of sitemap, each with a very specific function:
XML sitemap: for search engines
- Content structured in XML format, readable by search engine robots.
- Contains essential information such as the date of last modification (lastmod), the update frequency (changefreq) and the page priority (priority).
- Allows fast indexing and better ranking of content by hierarchy.
- Must be submitted through tools such as Google Search Console and Bing Webmaster Tools.
HTML sitemap: for visitors
- A page that users can read and access to improve the site’s navigation.
- Contains links to all the site’s important pages in an organised list.
- Useful for accessibility and user experience, but with less impact on indexing by Google.
When should you use each sitemap?
| Sitemap type | Purpose | Audience |
| XML sitemap | Indexing and SEO | Search engines (Google, Bing, Yahoo) |
| HTML sitemap | User navigation | Site visitors |
Although the XML sitemap is crucial for SEO, the HTML sitemap can be an asset for sites looking to improve their user experience and their internal linking. However, for a WordPress site or any other CMS, it’s recommended to have both to maximise the visibility and accessibility of the content.
What are the different types of sitemap?
Standard sitemap
Standard sitemaps contain only the site’s main pages, such as the homepage, category pages and key posts or product pages. It’s particularly recommended for CMS platforms like WordPress, where tools such as Yoast SEO or Rank Math can generate this type of file automatically.
This type of XML sitemap is essential for sites with a fairly simple layout and structure, without specific content such as images, videos or news. It lets search engines index the site efficiently without an overload of unnecessary information.
Image and video sitemaps
Sitemaps dedicated to images and videos are designed to improve the visibility of multimedia content in Google Images and Google Search. They’re particularly useful for photographers, e-commerce sites, and blogs featuring visual content on a page.
Search engines sometimes struggle to understand images and videos without specific help.
An image sitemap can include information such as:
- The image URL
- The alternative text (alt attribute)
- Associated captions and descriptions
- The location of the image on the site
A video sitemap contains:
- The video URL
- The title and description
- The duration and upload date
- The preview thumbnail
This type of XML sitemap can therefore considerably improve the indexing and visibility of media in search results.
News sitemap
The news sitemap is used by Google News to list new content published on a news site. It lets Google quickly discover recent articles and display them in its news carousel.
Unlike a standard sitemap, the news sitemap follows strict rules:
- It must contain only articles published in the last 48 hours.
- It must be updated regularly to include new articles.
- It must not contain more than 1,000 URLs.
News sites, specialist blogs or any other site publishing news content absolutely need this XML file to maximise their presence on Google News.
Sitemap for e-commerce sites
An XML sitemap for e-commerce is indispensable for online shops, where page organisation can be complex. It lets search engines index the following correctly:
- Product pages
- Categories and subcategories
- Promotion and special offer pages
- Customer reviews
An e-commerce sitemap must be structured intelligently to avoid mistakes such as:
- Indexing useless filter pages
- Listing out-of-stock products
- Multiplying duplicate URLs (for example, a product reachable through several categories)
Platforms such as PrestaShop, WooCommerce or Magento have dedicated extensions to generate e-commerce XML sitemaps in an optimised way.
A good e-commerce sitemap directly helps improve product visibility and the organic traffic of an online shop.
How do you create an XML sitemap?
Generate a sitemap automatically
If you use a CMS such as WordPress, several plugins can generate XML sitemaps automatically:
- Yoast SEO
- Rank Math
- Google XML Sitemaps
Other tools such as XML-Sitemaps.com can generate an XML file for any type of site.
Create a sitemap manually
A sitemap can be created manually with a text editor. Here is an example of the XML structure:
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url><loc>https://www.example.com/</loc>
<lastmod>2024-03-20</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
</urlset>
Once created, this file must be hosted at the root of the site under the name sitemap.xml.
How do you optimise an XML sitemap for SEO?
Select the right pages
- Avoid adding useless files or URLs that return errors.
- Exclude pages with no SEO value (for example: legal notices).
Use the essential tags
- <loc>: Contains the page URL.
- <lastmod>: Indicates the last modification.
- <changefreq>: Specifies the update frequency.
- <priority>: Sets the page’s relative importance.
Avoid common mistakes
- Limit the file to 50,000 URLs or 50 MB.
- Check there are no orphan pages
- Check there are no URLs returning errors or redirects.
- Make sure the XML format is valid
- Ensure good website maintenance.
How do you submit an XML sitemap to Google and Bing?
Check your sitemap
Use tools such as Search Console or Screaming Frog to make sure the sitemap is properly structured.
Add the sitemap in Google Search Console
- Log in to Google Search Console.
- Go to Sitemaps in the left-hand menu.
- Add the URL of the sitemap.xml and click Submit.
Add the sitemap to Bing Webmaster Tools
Same process as for Google, but through Bing Webmaster Tools.
Declare the sitemap in robots.txt
Add this line to the robots.txt file:
Sitemap: https://www.example.com/sitemap.xml
XML sitemap: essential for every site?
Do you need a sitemap for a small site?
Even though Google can crawl a site without a sitemap, one is still recommended, especially for new sites or sites with few links from other pages.
Cases where a sitemap is essential
- Large sites with thousands of pages.
- E-commerce sites with frequently updated products.
- Content sites with lots of articles published every day.
Case study: the impact of an optimised XML sitemap
Optimising an XML sitemap can have a significant impact on a site’s search performance. A study carried out on a medium-sized e-commerce site (over 10,000 products) analysed the effects of a properly structured XML sitemap. Here are the results observed after an optimised sitemap was put in place and submitted to Google Search Console:
- Google’s crawl rose by 35%: Googlebot explored more pages, notably those that used to be hard to discover, and didn’t waste time on useless files.
- Indexed pages rose by 20% in a week: Thanks to better accessibility of the pages in the sitemap, their indexing was speeded up.
- The time to discover new pages was cut by 50%: Instead of waiting several weeks to see new products appear in search results, they were indexed much faster.
- Better visibility of images and videos: By adding a specific sitemap for images and videos, the illustrated products saw their organic traffic rise by 15%.
- Fewer indexing errors: Analysis in Google Search Console showed a 40% decrease in indexing errors linked to URLs not found or badly structured.
Conclusion of the study
Adding and optimising an XML sitemap makes it possible to:
- Maximise the search engines’ crawl rate.
- Improve indexing speed.
- Ensure better management of content and its hierarchy.
- Increase the visibility of strategic pages, notably for e-commerce sites, news blogs or visual portfolios.
Tools for managing XML sitemaps
Google Search Console
- Lets you submit and check an XML sitemap.
- Provides detailed statistics on page crawling and indexing.
- Alerts you to crawl errors or excluded pages.
Bing Webmaster Tools
- A tool similar to Google Search Console, but dedicated to Bing.
- Helps improve visibility on Bing and Yahoo by optimising the XML sitemap.
Screaming Frog SEO Spider
- Analyses the site and generates an XML sitemap automatically.
- Detects errors such as duplicate URLs, 404 redirects and missing tags.
- Lets you audit the site’s structure and suggest SEO improvements.
XML-Sitemaps.com
- An online XML sitemap generator for all types of site.
- Ideal for small sites without an SEO plugin.
- Easy to use, with no installation needed.
WordPress plugins (Yoast SEO, Rank Math, SEOPress)
- Yoast SEO: Generates an XML sitemap automatically and updates it in real time.
- Rank Math: Offers advanced features for managing XML sitemaps, including for images, videos and e-commerce products.
- SEOPress: An alternative to Yoast and Rank Math, allowing fine control of the XML sitemap according to your SEO needs.
With these tools, you can create, submit, optimise and monitor an XML sitemap to significantly improve a site’s indexing and organic search performance.
The XML sitemap is therefore an essential SEO tool
It makes crawling easier, improves indexing and optimises the management of a site’s content.
If these are the only key points you take away, then our article will have been useful!
- An XML sitemap helps Google and other search engines better understand a site’s structure.
- It can be generated automatically with plugins or created manually.
- It must be submitted through Google Search Console and Bing Webmaster Tools.
- Good optimisation improves search visibility and avoids errors.
Now that you have all the information, it’s up to you to create and optimise your XML sitemap to boost your SEO.




