Often mentioned in referencing, the sitemap is an useful element for search engines.
The sitemap is important in the SEO working. However some people are often doing a mistake about its role. this tutorial wil, explain what is the sitemap and how to create it.

What is the sitemap?
The sitemap is a file which list all site urls. It should not be confused with a site plan, which is a page that displays all site url.
It’s a xml file structured and codified to give some informations to the search engines. It helps them by telling them what they have to crawl and index. That avoids them to search what they have to look.
Referencing and indexing
Tell it immediatly, the sitemap doesn’t improve the referencing and the page ranking!
As said previously, the sitemap helps search engine bots to crawl site pages. It helps the page indexing by making it faster. However in the theory a site doesn’t need a sitemap to have its pages indexed. Search engine bots are fast so they shouldn’t have any issue to navbigate in the site and list all urls.
Sitemap usefulness
So if we shouldn’t need a sitemap, why it’s useful? The first reason is for a site with a complicated structure with a lot’s of sub-menus. It’s more difficult for bots and a sitemap guides them.
The second reason is for big sites with a high page number like online stores. The indexing takes more time and the sitemap can make it faster.
The last reason is similar to the last one. If the site has daily new content and a high activity with news publications, the pages need to be indexed fast.
Sitemap structure
As xml file, the sitemap has this following structure, with this ecample from Wikipédia:

loc : the url
changefreq : this attribute can have different values (hourly,daily, weekly, monthly,yearly). It defines how often the page is modified.
priority : it defines the page importance compared to others and indicates to the bot page order. That often follows the site hierarchy. More that descend in menus, more the priority decreases.The value is going from 1.0 to 0.5. It’s often the following values: 1.0, 0.85, 0.69, 0.5.
lastmod : optional attribute that able to indicates the last page edit. The date have to be in the AAAA-MM-JJ format.
Sitemap number
It all depends on your project, but if it is substantial, often we make three sitemaps: one for links, one for images and one for videos. But it can change, also depending on how you generate it.
In the case of forums, we generally carry out a sitemap by forum category see by forum and sub-form.
How to generate a sitemap?
If you only have a few pages on the site, you can do your sitemap manually. However, as soon as the number begins to be high it becomes tedious not to say colossal. When the sitemap must be updated regularly, the site having a strong activity, it becomes impossible. Fortunately, solutions exist.
If you are unsing a CMS, all of them have some extensions to generate and update sitemaps automatically. When there are installed, you have no longer thing to do. For WordPress, it’s included in plugins like Yoast SEO and Rank Math SEO.
If it’s a homemade website, there is two solutions: create your sitemap generator or you can also use an online sitemap generator (but a lot’s have a limit at 400 url) or a software (free or not). There isn’t any better solution, the best is one that fits for you.
For those who are using a website, forum, blog hosting service, the sitemap is generated by the platform. Ask it to find out his address.
Upload the sitemap
Now the sitemap is generated, you need maybe to host it. The sitemap can be hosted anywhere, it haven’t to be at the site root. The most important thing is to know where they are, to indicate to the search engines correctly their location later. And especially that the location is accessible (not a file with limited access).
Submit the sitemap
Now you have to indicate to search engines your sitemap(s) and their location.
For Google you have to use the Search Console (you need to have a Google account).
After have entered your site informations, go in Index and Sitemaps and enter your sitemap url(s) and it’s done. No need to submit them again after, excepted if you are doing a important change (change their name or their location), Google will update them when the bot will read them.
Une le site rentré et les informations demandées remplies, aller dans Exploration puis Sitemap et rentrer les adresses des sitemaps et le tour est joué. Nul besoin de soumettre à nouveau les sitemaps une fois entrés, à moins d’un changement important sur votre site, Google l’actualisera tout seul.
it’s possible Google ask a process to validate the site. It’s a meta tag to add in the site header. I won’t talk more about it, you’ll have all informations indicated. If you are already using google Analytics you won’t have to do it.
For Bing, it’s a similar process by Bing Webmaster Tools
Configure the site, carry out the validation procedure (also via a meta tag or a file to place in the site root).
Then go to the site’s dashboard, configure my site, sitemaps, enter the address of your sitemaps and validate.
And after
There is no longer anything to do. Now search engine bots will update their datas each time the sitemap is modified. You have just to use the webmaster tools features to fix some potential issues that have been detected during the bot crawling (like broken links). But this another subject…