An XML sitemap is a structured list of URLs that helps search engines discover pages a site owner considers important. It is a discovery aid, not a command that guarantees indexing or rankings.
Choose canonical URLs
A clean sitemap normally contains public, accessible, canonical URLs. Avoid filling it with redirects, duplicate variants, internal search pages, login screens, or obsolete routes. Consistency between your sitemap, canonical tags and internal links makes technical troubleshooting much easier.
Do not treat a sitemap as a ranking shortcut
Submitting a sitemap does not force a search engine to index every URL. Search systems still evaluate accessibility, relevance, duplication and content quality. A smaller clean sitemap can therefore be more useful than a huge list generated without review.
Robots.txt has a different job
Robots.txt provides crawler instructions for compliant automated agents. It is not an access-control mechanism. Private documents should be protected with authentication or server permissions instead of relying on robots.txt.
The Robots.txt & XML Sitemap Generator can help create the text and XML structure, but the generated URLs should always be reviewed before deployment.
Common mistakes
Watch for HTTP URLs after an HTTPS migration, duplicate URLs with tracking parameters, redirects left in the sitemap, and old routes that no longer represent useful pages. Large sites can also accidentally include archive or filter URLs that should not be discoverable.
Test the deployed files
After publishing, open the actual robots.txt and sitemap.xml URLs. Confirm the response is correct, the URLs are absolute, and HTTPS is used consistently. Review the files again after a major redesign or URL migration.
Maintenance
A sitemap should reflect the current site. If your pages change frequently, automate generation or schedule regular reviews. Do not add a URL merely because it exists in a database. Ask whether it is useful, accessible, canonical and intended for discovery.
Conclusion
A good XML sitemap is focused, current and easy to audit. Keep its role separate from security, review the URLs before publishing, and test the live files after important site changes.