#13714·openlibrary

Sitemap generator still emits http://openlibrary.org URLs

Author: Davidix07TVCreated Sep 23, 2026Updated Sep 23, 2026
LabelsType: BugModule: Data dumpsNeeds: TriageNeeds: Staff Decision

Problem

While looking through the sitemap generator, I noticed that openlibrary/data/sitemap.py still hardcodes http://openlibrary.org in generated sitemap URLs.

In t_sitemap:

python
<url><loc>http://openlibrary.org$path</loc><lastmod>${last_modified}Z</lastmod></url>

And in write_siteindex:

python
base_url = "http://openlibrary.org/static/sitemaps/"

Since Open Library is served over HTTPS, the generated sitemap entries probably should use https://openlibrary.org instead.

Why this matters

Sitemaps are consumed by search engines and other crawlers as canonical discovery hints. Even if HTTP redirects to HTTPS, emitting HTTP URLs adds an unnecessary redirect hop and can make the canonical scheme less clear.

Suggested fix

Update the sitemap generator to emit HTTPS URLs, for example:

python
<url><loc>https://openlibrary.org$path</loc><lastmod>${last_modified}Z</lastmod></url>

and:

python
base_url = "https://openlibrary.org/static/sitemaps/"

If there is a reason these are intentionally HTTP, it may be worth adding a short comment in the generator so future readers understand why.

Source: internetarchive/openlibrary