Skip to main content

Sitemap Tester 🔍

PyPI version License: MIT

A lightweight, high-speed terminal utility to audit XML sitemaps. It checks every URL for HTTP status codes, redirects, and canonical tag accuracy.

🌟 Features

  • Automated Crawling: Extracts all URLs from any standard XML sitemap.
  • Status Checker: Identifies broken links (404), server errors (500), and redirects (301/302).
  • Canonical Validation:
    • Detects missing canonical tags.
    • Flags pages with multiple canonical tags.
    • Verifies if the canonical URL matches the sitemap URL (Self-referential check).
  • Modern Tech: Built with uv, requests, and BeautifulSoup4.

📦 Installation

Install directly from PyPI:

pip install sitemap-tester

Or using uv:

uv tool install sitemap-tester

🚀 Usage

Once installed, you can run the tool from anywhere in your terminal using the sitemap-tester command:

Basic Check

sitemap-tester https://example.com/sitemap.xml

Using a Custom Tag

If your sitemap uses a tag other than <loc> for URLs, you can specify it:

sitemap-tester https://example.com/sitemap.xml --key url

📊 Example Output

🚀 Analyzing 54 URLs....

1. https://example.com/ | Status: 200 | Canonical Match: ✅
2. https://example.com/about | Status: 200 | Canonical Match: ✅
3. https://example.com/old-page | Status: 301 | Redirected to https://example.com/new-page | Canonical Match: ❌

========================================
Total status errors: 1
Total canonical errors: 1
========================================

🛠️ Development

To contribute or run locally:

  1. Clone the repo: git clone https://github.com/Mayank170906/sitemap-tester.git
  2. Install dependencies: uv sync
  3. Run tests: uv run sitemap-tester [URL]

📄 License

This project is licensed under the MIT License.

Metadata

Release files for sitemap-tester 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sitemap-tester 0.1.3
File Size Uploaded Provenance Actions
sitemap_tester-0.1.3.tar.gz 22.6 kB Without provenance Details for sitemap_tester-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sitemap-tester 0.1.3
File Interpreter ABI Platform Actions
sitemap_tester-0.1.3-py3-none-any.whl Python 3 none any Details for sitemap_tester-0.1.3-py3-none-any.whl

Total release size: 27.6 kB

Release files / sitemap_tester-0.1.3.tar.gz

Download URL sitemap_tester-0.1.3.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
83a2fc70b6f9b224623f957a7b779ef700f74302d414df6da3d6de54bee092dd
BLAKE2b-256 checksum
How to use checksums
8503dad52a3652adb6c13df937dca8a9a6e7ede4c75100c2c8efe25ce4d8123a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Release files / sitemap_tester-0.1.3-py3-none-any.whl

Download URL sitemap_tester-0.1.3-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b8065c0d8b81e2241c2ae1b463295fcae914ed83e3bc3cbc358779d11b03b79
BLAKE2b-256 checksum
How to use checksums
8c090e40f21268be7aba112aa5c48e431c2d820d831e20aff8ee7156afd47e3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.14

Security for sitemap-tester 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page