Search engines find pages by following links, but links are an unreliable map. A new page nobody links to yet, or an older page buried several clicks deep, can sit undiscovered for a long time. An XML sitemap fixes the map problem directly: it is a file that lists the pages on your site and hands that list to search engines.
This guide explains what a sitemap contains and how to build one with the free XML Sitemap Generator on Ovatly, which turns a plain list of URLs into a correctly formatted sitemap.xml file. It also covers the honest limits: a sitemap helps discovery, and nothing more.
Contents
- Quick answer
- What an XML sitemap is
- The fields inside each entry
- Which pages belong in the list
- How to create a sitemap, step by step
- Worked example: building a two-page sitemap
- Limitations and honest expectations
- Common mistakes
- FAQs
- Conclusion
Quick answer
An XML sitemap is a file, usually named sitemap.xml, that lists your pages as a set of url entries inside a urlset. Each entry holds one full absolute URL in a loc element, and can optionally carry a changefreq (how often the page changes), a priority, and a lastmod (when it was last modified). To build one: collect the canonical, indexable pages you want search engines to find, paste them into the XML Sitemap Generator one full URL per line including https://, optionally apply a change frequency, priority and last-modified date across the list, then copy or download the file and upload it to your site root. Reference it in robots.txt with a Sitemap line and in your search console accounts so engines know where it is.
What an XML sitemap is
A sitemap is a list, written in XML, of the URLs on a site that its owner wants search engines to know about. Where a robots.txt file tells crawlers where not to go, a sitemap does the opposite job: it points at the pages that matter. The two files work as a pair, and the guide on creating a robots.txt file shows how the Sitemap line connects them.
The structure is simple. The file is a urlset, and inside it each page gets a url block. The only required piece in each block is the loc: the page's full address. Everything else is optional metadata about that page. Because the format is strict XML, small errors can make the whole file unreadable to a parser, which is the main reason to generate the file rather than type it by hand. The generator also escapes special characters in URLs automatically, so an ampersand in a URL becomes & as XML requires, instead of silently corrupting the file.
The fields inside each entry
- loc is the page URL, and it must be a complete absolute URL, starting with http:// or https://. A bare domain or a relative path is not an entry; it is an error.
- changefreq is a hint about how often the page changes, such as weekly. When you generate a sitemap on Ovatly, the value you choose is applied to every URL in the list.
- priority is a relative importance value you assign within your own site. Like changefreq, the generator applies your chosen value across the list.
- lastmod is the date the page was last modified. You can apply one date to the whole list, which makes sense when a batch of pages genuinely changed together.
Keep expectations about these optional fields level. Google largely ignores priority and changefreq values, and lastmod is used only when it is consistently accurate. A wrong lastmod on every page teaches engines to distrust the field; an honest one on pages that really changed is the only version worth sending. The loc list is the part that does the real work.
Which pages belong in the list
List the canonical, indexable pages you want search engines to find: the version of each page you actually want in results, in a state that can be indexed. Leave out redirects, noindexed pages and duplicates. A sitemap full of URLs that redirect or refuse indexing sends mixed signals and wastes the file's credibility.
Size has rules too. The sitemap protocol allows up to 50,000 URLs and 50 MB uncompressed per file. The generator enforces a practical cap of 2,000 URLs per build and tells you when it trims the list. A site bigger than that splits its list into several files joined by a sitemap index, a single file that lists the sitemaps rather than the pages.
How to create a sitemap, step by step
- Gather your URLs and paste them into the XML Sitemap Generator, one full URL per line, including https://.
- Optionally choose a change frequency, a priority and a last-modified date to apply to every URL.
- Check the skipped-lines report if any URL was rejected, and fix the line rather than ignoring it.
- Copy or download the generated sitemap.xml and upload it to your site root.
- Point crawlers at it: add a Sitemap line to your robots.txt and submit the address in your search console accounts.
Worked example: building a two-page sitemap
Take a small site with two pages to list: the home page and an about page. You paste these two lines:
https://example.com/
https://example.com/about
You select change frequency "weekly" and priority "0.8". The output is a urlset where each page appears as a url block with its loc plus the chosen changefreq and priority values: the home page entry carries its full address, weekly and 0.8, and the about page entry carries the same treatment with its own address.
Now suppose the second line had been typed as "example.com/about", without the protocol. That line is reported and skipped, because sitemap entries must be full absolute URLs. The file still generates, containing only the home page, and the report tells you exactly which line to correct. That behaviour is deliberate: a skipped line you can see and fix beats a broken file that fails silently when a search engine tries to parse it.
Limitations and honest expectations
- Discovery, not rankings. A sitemap helps search engines find and crawl new or deep pages. It does not improve rankings; those depend on the pages themselves.
- A hint, not a guarantee. Listing a page does not promise it will be indexed. The sitemap is a discovery hint.
- Optional fields carry little weight. Google largely ignores priority and changefreq, and trusts lastmod only when it is consistently accurate.
- Protocol and tool limits. One file holds at most 50,000 URLs and 50 MB uncompressed by protocol, and this generator caps a build at 2,000 URLs and tells you when it trims. Larger sites need several files and a sitemap index.
- The list goes stale. A sitemap reflects the day it was made. When pages are added, removed or renamed, regenerate it rather than letting it describe a site that no longer exists.
Common mistakes
- Pasting relative paths or bare domains. Entries must start with http:// or https://. Anything else is skipped, and a long list can hide several skipped lines if you never read the report.
- Listing pages that should not be indexed. Redirects, noindexed pages and duplicates do not belong in the file. List canonical, indexable pages only.
- Inventing lastmod dates. Stamping every page with today's date when nothing changed makes the field worthless. Use dates that are true, or leave the field off.
- Forgetting to reference the file. A sitemap sitting at your root unannounced may still be found, but the reliable route is a Sitemap line in robots.txt plus submission in your search console accounts.
- Treating the sitemap as an SEO fix. If pages are not ranking, the sitemap is not the lever. It gets pages discovered; the pages themselves earn the rankings.
FAQs
Where do I put the sitemap file? At the root of the domain it describes, for example https://example.com/sitemap.xml, and reference it in robots.txt with a Sitemap line and in your search console accounts.
Should every page be in the sitemap? List the canonical, indexable pages you want search engines to find. Leave out redirects, noindexed pages and duplicates; the sitemap is a discovery hint, not a guarantee of indexing.
Why was one of my URLs skipped? Entries must be complete absolute URLs starting with http:// or https://. Relative paths and bare domains without a protocol are reported and excluded so the file stays valid.
Does a sitemap improve rankings? No, it helps discovery and crawling of new or deep pages. Rankings depend on the pages themselves.
How many URLs can one sitemap file hold? The protocol allows up to 50,000 URLs and 50 MB uncompressed per file. This tool enforces a practical cap of 2,000 URLs per build and tells you when it trims the list; split larger sites into several files joined by a sitemap index.
Conclusion
A sitemap is a short, honest list: the canonical pages you want found, each written as a full absolute URL, with optional fields used truthfully or not at all. Generate it with the XML Sitemap Generator, read the skipped-lines report, upload the file to your root, and announce it in robots.txt and your search console accounts. Then let it do its one job, discovery, while the pages themselves do the rest. For more tools like this, browse the SEO Tools guides collection.