ToolMitra
ToolMitra Learning Centre

How to Create an XML Sitemap for Your Website

Understand what an XML sitemap contains, which URLs to include and how to submit it.

An XML sitemap is a file that lists URLs a site owner wants search engines to discover. It can be especially useful for larger sites, new sites or sites with pages that are not strongly linked from other pages.

1. Decide which URLs belong

Include canonical pages that are useful and intended to appear in search. Exclude redirects, duplicate URL variants, private pages and pages marked noindex.

2. Generate the XML

Use your platform's sitemap feature or create a valid XML file. Each URL should be absolute and use the preferred HTTPS hostname. Keep the file within protocol limits.

3. Publish it at a stable URL

A common location is /sitemap.xml. Open the URL in a browser to confirm it loads and contains the intended URLs.

4. Reference it in robots.txt

You may add a Sitemap line in robots.txt pointing to the full sitemap URL. This helps crawlers discover the file but does not force crawling.

5. Submit and maintain it

Submit the sitemap in the relevant search engine webmaster tools. Update it when important URLs are added, removed or changed.

6. Check errors

Use a sitemap checker to verify accessibility and inspect the XML. Investigate unexpected redirects, blocked URLs and malformed markup.

Submitting a sitemap does not guarantee that every URL will be crawled or indexed. Keep internal links and page quality strong as well.

Explore related resources: Tool Guides · All Free Tools.