Skip to main content

A fast CLI tool to audit sitemaps for HTTP status codes and canonical tag mismatches.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sitemap_tester-0.1.2.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sitemap_tester-0.1.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file sitemap_tester-0.1.2.tar.gz.

File metadata

  • Download URL: sitemap_tester-0.1.2.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for sitemap_tester-0.1.2.tar.gz
Algorithm Hash digest
SHA256 234107fd011ef1183d4a1d9a2db169c67b00ba939004ab609d0828761477ef99
MD5 aa21e41e93b7ac5541c9ed2f7b79e837
BLAKE2b-256 6d9b99d755051d2d3b83e6863e9cf2675adb5d5efbda2c2444dd6f430262c32d

See more details on using hashes here.

File details

Details for the file sitemap_tester-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for sitemap_tester-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4720ff429a1d7a39e3ff6d652dd7189b77ffe32c115612c5eee67ed2d97c977d
MD5 0738d78779ef94b29d35bd6da3d20c5a
BLAKE2b-256 849d56d32a748fa9c636bec6e24860fae7f7254cd085b43bc2ab2d1421336a0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page