Do I need an XML sitemap, and how do I submit it to Google? I run a small website and want to know if a sitemap is really necessary.
An XML sitemap is a file that lists the URLs on your site that you want search engines to crawl and index. Google can discover most pages by following links, so a sitemap is not strictly required, but it is recommended for almost every site and is especially useful when:
the site is new and has few external links pointing to it,
the site is large (hundreds or thousands of pages),
some pages are poorly linked internally, or
you publish new content often and want it found quickly.
What a good sitemap contains
Only canonical, indexable URLs that return a 200 status, with no redirects, 404 pages, noindex pages or duplicate parameter URLs.
An accurate lastmod date when a page actually changes. Google ignores the priority and changefreq values.
No more than 50,000 URLs or 50 MB (uncompressed) per file. Larger sites use a sitemap index that points to several sitemaps.
On WordPress you rarely need to build one by hand: WordPress creates /wp-sitemap.xml by default, and SEO plugins such as Rank Math or Yoast generate a sitemap index (often /sitemap_index.xml) for you.
How to submit it
Open Google Search Console and select your property.
Go to Indexing → Sitemaps, enter the sitemap URL and click Submit.
Also add a line to your robots.txt file, e.g. Sitemap: https://example.com/sitemap_index.xml, so other search engines can find it too.
Come back later and check the status and the number of discovered URLs. Errors usually mean the file has broken or blocked URLs.
Keep in mind that a sitemap helps Google find pages but does not guarantee they get indexed. If pages are found but not indexed, see How can I find and fix indexing issues in Google Search Console?