Sitemap generator still emits http://openlibrary.org URLs
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:
<url><loc>http://openlibrary.org$path</loc><lastmod>${last_modified}Z</lastmod></url>And in write_siteindex:
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:
<url><loc>https://openlibrary.org$path</loc><lastmod>${last_modified}Z</lastmod></url>and:
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