Sitemap Status Change Watch
Pricing
from $1.00 / 1,000 change reports
Sitemap Status Change Watch
Monitors a public HTTPS site's robots-permitted sitemap URLs and reports newly broken, recovered and redirected pages versus a saved per-domain baseline.
Pricing
from $1.00 / 1,000 change reports
Rating
0.0
(0)
Developer
Practical AI Lab
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
9 days ago
Last modified
Categories
Features
Share
Tells you when pages listed in a public website's sitemap newly break, recover or start redirecting between two scheduled runs.
The first run saves a per-domain baseline (BASELINE_CREATED). Every later run for the same domain compares a stable sample of sitemap URLs against that baseline and reports only what changed. It is a lightweight monitor for site owners, SEO and web operations teams, and agencies that want a change alert, not a full crawl.
What it does
- Reads
robots.txtfirst and obeys it (wildcards,$, longest-match rules,Crawl-delay). If robots rules cannot be read, or they disallow the site, the run stops. - Reads the sitemaps listed in
robots.txt(same origin only), or/sitemap.xmlif none are listed. Sitemap indexes and.gzsitemaps are supported within strict limits. - Picks a deterministic hash-based sample of the sitemap URLs, so the same URLs are re-checked on every run.
- Checks each sampled URL with a
HEADrequest (GETwithout reading the body ifHEADis unsupported). Redirects are recorded, never followed. Page bodies are never downloaded. - Compares the results with the saved baseline, writes the changes to the dataset and a CSV file, and updates the baseline.
Input
Only startUrl is required.
| Field | Default | Meaning |
|---|---|---|
startUrl | – | Public HTTPS site root, for example https://example.com. No path, query, port or credentials. |
maxUrlsToCheck | 100 (1–500) | Size of the sample that is status-checked each run. |
maxSitemapUrls | 5000 (1–20000) | Maximum sitemap URLs held in memory. |
maxSitemapFiles | 10 (1–30) | Maximum sitemap or sitemap index files downloaded. |
requestDelayMillis | 500 (250–10000) | Pause between requests. A larger Crawl-delay from robots.txt wins. |
requestTimeoutSeconds | 15 (5–30) | Timeout per network operation. |
resetBaseline | false | Discard the saved baseline and start over. |
stateStoreName | pal-sitemap-status-watch-baselines | Named key-value store holding one baseline per domain. |
First-run example
Replace the placeholder with a site you own or are allowed to monitor (example.com itself publishes no sitemap, so it will end in SITEMAP_NOT_FOUND):
{"startUrl": "https://example.com","maxUrlsToCheck": 100}
Run it once to create the baseline, then schedule the same input.
Output
Each run writes to the dataset:
- one
SUMMARYrecord (status, counts, sample coverage, notes, start and finish timestamps), - one
CHANGErecord per detected change.
It also stores OUTPUT (the summary as JSON) and, when there are changes, CHANGES.csv in the run's key-value store. Run statuses: BASELINE_CREATED, NO_CHANGES, CHANGES_DETECTED, FAILED.
Structure of a change record (placeholder values for illustration only):
{"recordType": "CHANGE","domain": "example.com","changeType": "NEWLY_BROKEN","url": "https://example.com/some-page","sourceSitemapUrl": "https://example.com/sitemap.xml","previousCategory": "OK","previousStatusCode": 200,"currentCategory": "BROKEN","currentStatusCode": 404,"currentRedirectTarget": null,"redirectSameOrigin": null,"error": null,"previousCheckedAt": "2026-01-01T06:00:00Z","checkedAt": "2026-01-02T06:00:00Z"}
changeType | Meaning |
|---|---|
NEWLY_BROKEN | Was OK or redirecting, now 4xx/5xx or a network error. |
NEW_URL_BROKEN | URL is new to the baseline and is already broken. |
NEWLY_REDIRECTED | Was OK, now answers with a redirect. |
REDIRECT_TARGET_CHANGED | Still redirects, but to a different target. |
REDIRECT_REMOVED | Used to redirect, now answers directly. |
RECOVERED | Was broken, now OK or redirecting. |
A URL that stays broken is not reported again; it is reported once when it breaks. Redirects that leave the site or downgrade to HTTP are flagged with redirectSameOrigin: false and are not followed.
Scheduling
Baselines live in a named key-value store (stateStoreName), keyed by domain, so they persist across runs and are shared by every run in your account that uses the same store name. Create an Apify Schedule that runs the Actor with identical input, for example daily. A blank stateStoreName uses the run's default store, which only persists for local runs, not for cloud runs.
To monitor several sites, create one saved task per site root.
Billing behavior
The code requests one pay-per-event charge named change-report per run, and only when the run succeeded and reported at least one change. It never requests a charge for baseline runs, no-change runs or failed runs. The payable plan and price are configured separately from this package.
Safety and compliance
- HTTPS only, default port only, no credentials in URLs, no IP-address, localhost or reserved host names.
- DNS results are checked and the connection is pinned to the validated public address; private, loopback, link-local and similar ranges are refused.
- Only URLs on the exact same host as
startUrlare requested. Third-party domains and cross-origin or non-HTTPS redirects are never contacted. - No proxies, logins, cookies, contact or email harvesting. The user agent is
PALSitemapStatusWatchand the output contains only URLs, status codes and timestamps. - Response sizes are capped (sitemaps 5 MB, 20 MB after decompression; robots.txt 512 KB). XML with DTD or entity declarations is rejected.
Limitations and sample-size caveats
- It checks a sample, not every page. With
maxUrlsToCheck100 on a 10,000-URL sitemap, about 1% of URLs are covered, and breakage elsewhere is invisible. The summary reports the coverage percentage; raise the limit or run separate tasks for larger sites. - The sample is stable only while the sitemap's URL set is stable. New URLs enter the sample by hash, so some URLs may appear or drop out between runs.
- When a sitemap exceeds
maxSitemapUrlsormaxSitemapFiles, later URLs are not read and the summary says so. - Only URLs listed in the sitemap are checked. Links inside pages are not crawled and page content is never inspected, so soft 404s (an error page served with status 200) are not detected.
- A redirect is recorded as one hop; chains and final status codes are not followed.
- Bot protection or rate limiting can return 403, 429 or 5xx to a monitoring client and appear as breakage. Each failing URL is retried once, and a run where at least half of the checks fail at the network level (with at least 10 checks) fails without touching the baseline. A single check is still a point-in-time observation.
- Status changes are relative to the previous successful run. Changing the input between runs (such as the sample size) changes which URLs are compared.
- If
robots.txtis missing (404/410) the site is treated as unrestricted. Any other robots.txt failure stops the run. - Baselines keep at most 5,000 URLs per domain.
- Sitemap files above the size caps, or crawl delays above 30 seconds, are not supported.
Local development
pip install -r requirements.txtpython -m unittest discover -s tests -t .
The unit tests mock all HTTP traffic and need no network access.