The idea behind the sitemap is to make it easier for web crawlers such as Googlebot to find all the pages on your site. If a site does not have a sitemap then Googlebot has to:
visit each page and find links
then go and visit the next page and find more links
This can take a long time to discover them all and a sitemap can speed up this discovery.
As the sitemap is a list of all the pages we can give this file to Googlebot so that it knows which pages to visit.
Here are 3 reasons why you need to have a sitemap:
1) Your site does not have good internal links
If your site does not have many internal links to other pages you have created, a sitemap can help. A page without any links is an orphaned page.
Google will never find an orphaned page.
To fix this you can list all your pages in a sitemap.
2) Your site has a lot of pages
The sitemap can include the updated date of all your pages. When you have a site with many pages you can let Google know which pages have been recently updated. This will help Google find the pages they need to crawl next.
3) The site is new
If you have a new site you may not have any external links to the pages on your site. In this case, a sitemap can help speed up the discovery of the pages.
How do I find my sitemap?
If you are lucky you will find your sitemap at the root:
One way to find it is to use the robots.txt file. This is a file used by bots like Googlebot that crawl your website. This file is also found in the root of the website here is the robots.txt for PageDart:
If you look at this file you can see that there are a few lines. One of these lines is the sitemap link:
Again you don't want to do this by hand and should use your website software to update it. For Hugo, it has multilingual support by default, so there is nothing special to configure. For WordPress, you will need to install the WPML plugin. Then Yoast or Rank Math will be able to output the hreflang in your sitemap.
It is easier to manage your language version is a single file and you can use the sitemap to do it.
Wrapping Up, What is a sitemap?
We have covered what is a sitemap. It is a file that lists all the pages that you want the search engines to show in the search results.
You need a sitemap when you:
Have a new site with few external links
A site with poor internal links and orphaned pages
A large site with many pages
This covers most websites! So make sure that you set up a sitemap using an automated process. For WordPress look at the Yoast, SEOPress or Rank Math plugins.
If you are using a static site generator then the framework will generate one for you as Hugo does.