TToolbox
🗺️

Sitemap Generator

Build sitemap.xml from a URL list

About this tool

The XML Sitemap protocol (standardized by sitemaps.org 0.9 across Google, Bing, and Yahoo) is the official communication protocol for webmasters to submit all crawlable URLs directly to search engine spiders. For sites with dozens of utility pages, new releases, or deep routing hierarchies, crawlers frequently miss isolated pages. Deploying a validated `sitemap.xml` informs engines of canonical URLs, modification timestamps (`lastmod`), and crawl priorities (`priority`). This tool compiles URL lists into valid XML sitemaps locally.

How to Use This Tool (Step-by-Step)

1

Paste Complete URL List

Paste your canonical absolute URLs (e.g., `https://example.com/zh/tools/base64/`) into the input field, one URL per line.

2

Configure Priority & Frequency

Select crawl frequency (`weekly`, `daily`), set lastmod date (ISO 8601), and assign priority values (ranging from `0.1` to `1.0`).

3

Generate & Download sitemap.xml

The validated XML tree renders in real time. Download the ready-to-deploy `sitemap.xml` file with a single click.

Official Sitemaps 0.9 Schema Compliance

Embeds official sitemaps.org 0.9 XML namespaces, guaranteeing immediate validation across Google Search Console and Bing Webmaster Tools.

ISO 8601 lastmod Support

Formats `lastmod` tags using ISO 8601 dates (`YYYY-MM-DD`), providing reliable freshness signals to trigger search engine recrawling.

100% Client-Side Air-Gapped

Sitemap compilation executes entirely inside local browser memory. Staging URLs and internal site topologies remain 100% private.

Sitemap Best Practices & Submission Tips

  • •Always use absolute URLs with matching trailing slashes: Never use relative paths. URLs must match canonical tags exactly to avoid redirect loops.
  • •Declare sitemaps inside `robots.txt`: Append `Sitemap: https://example.com/sitemap.xml` so spiders discover indexing files on arrival.
  • •Never include 404 or noindex URLs: Only clean, indexable 200-OK pages belong in sitemaps. Submitting redirects or broken links harms crawler trust.

Code & Transformation Examples

Standard XML Sitemap Structure Benchmark

Valid XML Sitemap Syntax
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2026-09-23</lastmod>
    <changefreq>daily</changefreq>
    <priority>1.0</priority>
  </url>
  <url>
    <loc>https://example.com/tools/json-format/</loc>
    <lastmod>2026-09-23</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>
Tag Definitions
• <loc>        : 页面的规范完整绝对网址 (必须带 https:// 协议)
• <lastmod>    : 页面最后修改日期 (ISO 8601 格式)
• <changefreq> : 更新预估频次 (always, hourly, daily, weekly, monthly)
• <priority>   : 相对站内权重 (0.0 到 1.0,首页建议 1.0,工具建议 0.8)

* Single sitemap files are capped at 50MB uncompressed and 50,000 URLs max under protocol rules.

Next.js App Router Dynamic sitemap.ts Snippet

Next.js sitemap.ts
import { MetadataRoute } from 'next';

export default function sitemap(): MetadataRoute.Sitemap {
  return [
    {
      url: 'https://example.com/',
      lastModified: new Date('2026-09-23'),
      changeFrequency: 'daily',
      priority: 1.0,
    },
    {
      url: 'https://example.com/tools/json-format/',
      lastModified: new Date('2026-09-23'),
      changeFrequency: 'weekly',
      priority: 0.8,
    }
  ];
}
Benefits
Next.js 会在编译时自动将其渲染为完全合规的 /sitemap.xml 静态文件,免去手动维护 XML 标签字符的繁琐。

* Binding database models to `sitemap.ts` automates site index publishing across deployment builds.

Frequently Asked Questions

Q: Why does GSC show 'Discovered - currently not indexed' after sitemap submission?

A: Submitting a sitemap announces URLs to Google's scheduler. Actual indexing depends on crawl budgets, host performance, and domain quality over time.

Q: What should I do if my site exceeds 50,000 URLs?

A: Use a Sitemap Index file (`sitemap_index.xml`). It groups multiple child sitemaps (`sitemap1.xml`, `sitemap2.xml`), each capped below 50,000 URLs.

Q: Where should `sitemap.xml` be placed on my web host?

A: Must reside at the site's top-level root directory (`/sitemap.xml`). A sitemap can only govern paths at or below its own directory level.

Related Tools

All processing happens locally in your browser. Your data is never uploaded to a server.
/