Free XML Sitemap Generator
Generate a valid XML sitemap from your list of URLs, ready to download and submit to search engines. Set optional attributes like last modified date, change frequency, and priority for each URL.
Paste URLs
Enter one URL per line
Add Individual URL
Why XML Sitemaps Matter
XML sitemaps are one of the most important technical SEO files on your website. They serve as a roadmap for search engine crawlers, helping them discover and index your pages efficiently. Without a sitemap, search engines rely solely on following internal links, which means orphaned or deeply nested pages may never get crawled.
For new websites, sites with thousands of pages, or pages with few inbound links, a well-structured XML sitemap is essential for ensuring complete search engine coverage. Google, Bing, and other search engines all support the XML sitemap protocol.
XML Sitemap Protocol
The XML sitemap protocol is defined at sitemaps.org and specifies a standard format that all major search engines understand. Here is the structure of a valid XML sitemap:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2024-01-15</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/about</loc>
<lastmod>2024-01-10</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>- <loc> (required) — The full URL of the page. Must include the protocol (http or https).
- <lastmod> (optional) — The date the page was last modified, in YYYY-MM-DD format (W3C datetime).
- <changefreq> (optional) — A hint about how often the page changes: always, hourly, daily, weekly, monthly, yearly, or never.
- <priority> (optional) — A value from 0.0 to 1.0 indicating the relative importance of the URL within your site. Default is 0.5.
How to Use This Tool
- Paste your URLs into the bulk input area (one URL per line) or add them individually using the single URL input.
- Set optional attributes for each URL in the table: last modified date, change frequency, and priority. These are all optional.
- Click "Generate Sitemap" to create the XML output. The tool validates all URLs and warns about any issues.
- Download the file as
sitemap.xmlor copy the XML to your clipboard. - Upload to your website root directory and submit to search engines.
How to Submit Your Sitemap
Once you have generated your sitemap, there are three ways to submit it to Google:
1. Google Search Console
The recommended method. Go to Google Search Console, select your property, navigate to "Sitemaps" in the left menu, enter your sitemap URL, and click "Submit". Google will show you the submission status and any errors found.
2. robots.txt Directive
Add a Sitemap directive to your robots.txt file. This ensures every search engine that reads your robots.txt discovers the sitemap:
Sitemap: https://example.com/sitemap.xml3. Ping URL
You can notify Google about your sitemap by requesting this URL in your browser or via a script:
https://www.google.com/ping?sitemap=https://example.com/sitemap.xmlSitemap Best Practices
- Only include canonical URLs — Do not include redirected URLs, non-canonical pages, or pages blocked by robots.txt.
- Keep sitemaps under 50,000 URLs — If you have more, split them into multiple sitemaps and create a sitemap index file.
- Use accurate lastmod dates — Google uses this to decide which pages to recrawl. Only update the date when the page content actually changes.
- Use HTTPS URLs — If your site uses HTTPS (which it should), all URLs in the sitemap should use the HTTPS protocol.
- Include only indexable pages — Pages with noindex tags or that return 4xx / 5xx status codes should not be in the sitemap.
- Update your sitemap regularly — When you add or remove pages, update your sitemap to reflect the current state of your site.
- Compress large sitemaps — For sitemaps approaching the 50MB limit, use gzip compression (sitemap.xml.gz).
Frequently Asked Questions
What is an XML sitemap?
An XML sitemap is a file that lists all the important URLs on your website. It helps search engines like Google discover, crawl, and index your pages more efficiently. The file follows a standardized XML format defined by the Sitemaps protocol at sitemaps.org.
How many URLs can an XML sitemap contain?
A single XML sitemap can contain up to 50,000 URLs and must not exceed 50MB (uncompressed). If your site has more than 50,000 URLs, you should split them across multiple sitemaps and reference them from a sitemap index file.
Are lastmod, changefreq, and priority required?
No, only the <loc> (URL) element is required. The lastmod, changefreq, and priority elements are optional. Google primarily uses lastmod and tends to ignore changefreq and priority. However, including lastmod with accurate dates can help Google prioritize which pages to recrawl.
Where should I place my sitemap.xml file?
Place your sitemap.xml file in the root directory of your website (e.g., https://example.com/sitemap.xml). You should also reference it in your robots.txt file using the Sitemap directive and submit it via Google Search Console for faster discovery.
How do I submit my sitemap to Google?
You can submit your sitemap to Google in three ways: through Google Search Console under the Sitemaps section, by adding a Sitemap: directive to your robots.txt file, or by pinging Google at https://www.google.com/ping?sitemap=YOUR_SITEMAP_URL.
Track Your Brand Across Google & AI
QuickSEO connects your Google Search Console data with AI visibility tracking across ChatGPT, Claude, and Gemini — all in one dashboard.
Try QuickSEO →