An XML sitemap is a file that lists all the important URLs on your website in a format that search engines can understand. It is essentially a roadmap of your site that helps search engine crawlers discover pages they might otherwise miss, understand how frequently pages are updated, and prioritize which pages to crawl first. While search engines can discover pages by following links, a sitemap accelerates and improves the crawling process — especially for large sites, new sites, or sites with complex navigation.
Understanding Sitemap.xml Structure
A sitemap.xml file follows a specific XML schema defined by the sitemaps.org protocol. Each URL entry is wrapped in a <url> element and can include several optional child elements: <loc> (the URL, required), <lastmod> (date of last modification), <changefreq> (how often the page changes), and <priority> (relative importance, 0.0 to 1.0).
The sitemap must be UTF-8 encoded, URLs must be fully qualified (including the protocol, e.g., https://), and the file itself must be located at the root of your domain or in a subdirectory with the path specified in robots.txt. A single sitemap can contain up to 50,000 URLs and must not exceed 50MB uncompressed.
Sitemap Priority and Change Frequency
Priority
The priority attribute indicates the relative importance of a URL within your site, on a scale from 0.0 to 1.0. The default is 0.5. This does not affect how search engines rank your pages — it only influences the order in which crawlers visit them within your site. Set your homepage to 1.0, main category pages to 0.8–0.9, individual content pages to 0.6–0.8, and low-priority pages (terms of service, archived content) to 0.3–0.5.
Change Frequency
The changefreq attribute suggests how often a page is likely to change: always, hourly, daily, weekly, monthly, yearly, or never. This is a hint to crawlers, not a command. Search engines may revisit a page more or less frequently than specified. Set this based on your actual update schedule — if you publish new blog posts weekly, set your blog index to "weekly". If your about page rarely changes, set it to "yearly".
Sitemap Index Files
For sites with more than 50,000 URLs or sitemaps larger than 50MB, use a sitemap index file. A sitemap index references multiple individual sitemap files, allowing you to organize URLs by type (pages, images, videos, news) or by section of your site. Each sitemap index can reference up to 50,000 sitemaps, supporting sites with up to 2.5 billion URLs.
The sitemap index uses a <sitemapindex> root element containing <sitemap> entries, each with a <loc> and optional <lastmod>. This hierarchical structure helps both search engines and site administrators manage large collections of URLs efficiently.
Submitting Your Sitemap
There are three primary ways to make your sitemap available to search engines. First, submit it directly through Google Search Console and Bing Webmaster Tools — this is the fastest method and provides feedback on crawling status. Second, reference it in your robots.txt file with a Sitemap: directive — all major search engines check robots.txt for sitemap references. Third, use the sitemap ping endpoint: send a GET request to https://www.google.com/ping?sitemap=YOUR_SITEMAP_URL to notify Google of updates.
Common Sitemap Mistakes
- Including noindex pages: URLs with noindex meta tags should not be in your sitemap. This sends conflicting signals to search engines
- Non-canonical URLs: Every URL in your sitemap should be the canonical version. If a page has canonical tags pointing to a different URL, use that URL in the sitemap instead
- Outdated entries: Remove or update URLs that return 404 errors. A sitemap full of dead links wastes crawl budget
- Incorrect encoding: Special characters in URLs must be properly encoded (e.g., spaces as %20, & as &)
- Blocked by robots.txt: If your sitemap or the URLs it references are blocked by robots.txt rules, search engines cannot access them
Using RiseTop's Sitemap Generator
RiseTop's sitemap generator creates valid XML sitemaps from a list of URLs. Enter your URLs (or paste them from a spreadsheet), set priorities and change frequencies, and download a ready-to-use sitemap.xml file. The tool validates all URLs, ensures proper XML encoding, and can generate both individual sitemaps and sitemap index files for larger sites.