What a sitemap looks like
A sitemap for search engines is an XML file, usually at an address such as yoursite.com/sitemap.xml. It lists the URLs of the pages you want in Google, each with the date it was last changed. On larger websites it is split into several smaller files, for example separate ones for pages, articles, products and categories, and the main file simply links to them.
There is also a sitemap for people, an ordinary page with a list of links. That is a different thing and is rarely used today.
How Google uses it
Google finds pages mainly by following links from one page to another. A sitemap gives it a ready-made list. It helps Google discover pages that few links point to and find out what has changed since its last visit. It is a recommendation, not an instruction. Being in the sitemap does not guarantee that a page will appear in results. That is decided by indexing.
Submit your sitemap through Google Search Console and also list it in your robots.txt file. In Search Console you can then see how many pages from the sitemap Google has accepted and which ones have problems.
Why it matters
For a small website with ten pages, Google manages fine without one. For an online shop with thousands of products that come and go, or a blog with regular articles, a sitemap noticeably helps new content get into Google faster.
Example
An estate agency adds new flat listings every week. Without a sitemap, Google would only discover a new listing several days later when it crawled the listings page. With an automatically updated sitemap, new flats appear in results faster, while they are still available.
Common mistakes
- The sitemap contains pages that do not belong there. Redirected URLs, error pages, pages with "noindex", thank-you pages shown after a form is submitted.
- A static file that never changes. Someone generated it once and since then a hundred pages have been added to the site.
- Several sitemaps from different plugins. WordPress has its own and an SEO plugin creates another. One is enough.
In WordPress the sitemap is created by the system itself or by an SEO plugin and updates automatically. You just need to check what is in it and submit it to Search Console. I set up the sitemap and submit it to Search Console as part of my SEO services.