What it is and where it lives
An XML sitemap is usually found at an address such as yourdomain.com/sitemap.xml or sitemap_index.xml. Each entry has a page address and optionally a last modified date. Large sites split the list into several sitemaps tied together by an index file. This format is meant for search engines, not people, who would use a visible site map page.
What belongs in it
List pages you want to appear in search: the home page, service pages, location or area pages, blog posts, and key information pages. Use the final preferred address of each, with https and your chosen www form, returning a normal 200 status.
Keep the last modified date honest. Changing it on every page daily teaches crawlers to ignore it.
What to leave out
Exclude pages that redirect, return errors, carry a noindex tag, duplicate other pages, or exist only for internal use such as thank-you pages, login screens, cart and checkout pages, and internal search results. A sitemap full of such entries wastes crawler attention and produces warnings in reports.
Tag archives and thin author pages on WordPress are often better left out too.
How to generate one
Most platforms create sitemaps automatically. WordPress now includes a basic one, and SEO plugins generate more configurable versions. Hosted builders usually provide one by default. Check that only one tool is producing it, so you do not end up with two competing files.
For a hand-coded site, a generator tool can produce the file, or your developer can build it from a list of pages.
Submit and monitor
In Google Search Console, open the Sitemaps report and enter the sitemap address. Bing Webmaster Tools has a similar option. You can also add a line to robots.txt pointing at the sitemap. After submission, check the status and any errors, such as pages that could not be fetched.
Compare the number of submitted addresses with indexed ones. A big gap deserves investigation: the cause may be duplicate content, thin pages, noindex tags or crawl problems. Recheck after big site changes.
Common sitemap problems and fixes
If Search Console reports that your sitemap could not be read, open the address in a browser. A blank page, a redirect or an error points to a plugin or server setting. If it says submitted pages are noindexed, either remove the tag or take the page out of the sitemap, since the two instructions contradict each other.
Another frequent issue is old addresses left in the file after a move to https. Regenerate the file and confirm every entry uses the current preferred address. Then resubmit and watch the report for a week or two.
For image-heavy or video-heavy sites there are extensions that list media, but most local business sites do not need them. Concentrate on keeping the main page list accurate and free of errors.
Common questions
Do I need a sitemap for a five-page site?
It is not strictly necessary if the pages are linked, but it costs nothing and helps with discovery and reporting.
Will submitting a sitemap make Google index everything?
No. It suggests pages to crawl. Indexing depends on quality, duplication and technical access.
How often should it update?
It should update automatically whenever you publish or remove pages.
This guide is general information. Search engines change how they work and their guidelines; check Google's current documentation for your situation. Nobody can guarantee a ranking.