A fast CLI tool to audit sitemaps for HTTP status codes and canonical tag mismatches.
Project description
Sitemap Tester 🔍
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, andBeautifulSoup4.
📦 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:
- Clone the repo:
git clone https://github.com/Mayank170906/sitemap-tester.git - Install dependencies:
uv sync - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sitemap_tester-0.1.3.tar.gz.
File metadata
- Download URL: sitemap_tester-0.1.3.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83a2fc70b6f9b224623f957a7b779ef700f74302d414df6da3d6de54bee092dd
|
|
| MD5 |
74acaad1c9a7ddd7039b4bee35ea75e4
|
|
| BLAKE2b-256 |
8503dad52a3652adb6c13df937dca8a9a6e7ede4c75100c2c8efe25ce4d8123a
|
File details
Details for the file sitemap_tester-0.1.3-py3-none-any.whl.
File metadata
- Download URL: sitemap_tester-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b8065c0d8b81e2241c2ae1b463295fcae914ed83e3bc3cbc358779d11b03b79
|
|
| MD5 |
d591d77a5499d1a5b62ae1d28d43b2e0
|
|
| BLAKE2b-256 |
8c090e40f21268be7aba112aa5c48e431c2d820d831e20aff8ee7156afd47e3e
|