ForHosting KIT · Web Scraping & Monitoring

Generate sitemap XML from a URL list

Create a complete sitemap.xml document from a structured list of pages without relying on a crawler, CMS plugin, or hand-written XML.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Each record requires an absolute HTTP or HTTPS URL and can also include a last modification date, change frequency, and relative priority. The generator validates the supplied values, escapes URL characters safely for XML, and returns a deterministic document ready to save, publish, test, or pass into another deployment step.

Prepare a precise URL inventory

Start with the canonical public URLs that search engines should be allowed to discover. Every record needs a complete address beginning with HTTP or HTTPS, including the hostname and the intended path. Relative paths such as <code>/products</code> are rejected because a sitemap reader cannot infer which origin they belong to. Include query strings only when those parameterized pages are canonical, useful search results in their own right; tracking variants usually do not belong in a sitemap. The generator preserves the submitted URL text and escapes XML-sensitive characters such as ampersands, so a query string remains meaningful without breaking the document. A single sitemap can contain up to 50,000 entries, matching the protocol limit. This tool deliberately does not crawl a domain, check whether pages respond, infer canonical links, or remove duplicates. That makes the input list authoritative and the result predictable. Build that list from your router, database, static-site output, or content inventory, and filter private, redirected, duplicate, blocked, or noncanonical pages before generating the file.

Use optional metadata honestly

Add <code>lastmod</code> only when you know when the page content last changed. It accepts a calendar date such as YYYY-MM-DD or an ISO 8601 timestamp with an explicit time zone. The value should describe the page itself, not the moment when you happened to run this generator. <code>changefreq</code> accepts the standard sitemap vocabulary: always, hourly, daily, weekly, monthly, yearly, or never. Search engines treat that field as a hint rather than a schedule, so choose a frequency that reflects real publishing behavior. <code>priority</code> is another optional hint, expressed as a finite number from zero through one. It compares URLs within your own site; it does not make your site more important than another domain and does not guarantee ranking or crawling. Omitting uncertain metadata is better than filling every element with invented defaults. The generator emits only the optional elements supplied for each record, keeping the XML concise while validating every included value before any result is returned.

Publish and maintain the generated document

The result contains the XML declaration, the official sitemap namespace, one URL element per input record, and a count that is useful in automation logs. Save the returned XML as <code>sitemap.xml</code> using UTF-8 encoding and serve it from a stable public location, commonly at the root of the relevant site. You can reference that location from robots.txt and submit it through the search-engine tools you use. Generation is deterministic: identical input produces identical output, with no network request, current-time lookup, random ordering, or hidden normalization. That property makes the capability suitable for builds and deployment pipelines because version-control diffs reflect changes in the supplied inventory. Regenerate the document whenever published canonical URLs or their reliable metadata change, then validate the deployed response and make sure it is not protected by authentication. For very large sites, divide records into protocol-compliant sitemap files and create an index through the appropriate workflow. Browser execution is free, while automated API requests use the published base price of $0.002.

Generate a sitemap during deployment

Turn the canonical routes produced by a build into deterministic XML before publishing the new release.

Export pages from a content database

Map published content records and their trusted modification dates into a search-engine-ready sitemap document.

Replace fragile hand-written XML

Maintain a structured URL list while the generator handles validation, element ordering, and XML escaping.

What input does the generator require?

Provide a non-empty array of records. Each record requires an absolute HTTP or HTTPS URL and may include lastmod, changefreq, and priority.

Does it crawl my website?

No. It generates XML only from the records you provide, so it performs no network requests and does not discover pages automatically.

How are ampersands and other special characters handled?

XML-sensitive characters in URLs are escaped in the output, preventing valid query strings from producing malformed XML.

Which lastmod formats are accepted?

Use YYYY-MM-DD or a complete ISO 8601 timestamp that includes Z or an explicit numeric time-zone offset.

Can priority improve a page's ranking?

No. Priority is a relative hint within your sitemap, not a ranking guarantee or a comparison with pages on other websites.

What does API generation cost?

The API base price is $0.002 per request. The same deterministic generator can run free in the browser.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/web/sitemap-xml-generate

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/web/sitemap-xml-generate \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"urls":[{"url":"https://example.com/","lastmod":"2026-07-25","changefreq":"weekly","priority":1},{"url":"https://example.com/about?from=site&lang=en","changefreq":"monthly","priority":0.6}]}'
{
  "urls": [
    {
      "url": "https://example.com/",
      "lastmod": "2026-07-25",
      "changefreq": "weekly",
      "priority": 1
    },
    {
      "url": "https://example.com/about?from=site&lang=en",
      "changefreq": "monthly",
      "priority": 0.6
    }
  ]
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "web.sitemap_xml_generate",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_items50000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →