Skip to content

Serve sitemap and og:url over https - #340

Merged
scgopi merged 1 commit into
mainfrom
docs/sitemap-https
Sep 12, 2026
Merged

scgopi merged 1 commit into
mainfrom
docs/sitemap-https

Conversation

@scgopi

@scgopi scgopi commented Sep 12, 2026

Copy link
Copy Markdown
Owner

sitemap.xml and every page's og:url on graphcode.app say http://, so each URL a crawler reads costs it a 301 to https://.

GitHub Pages derives site.url from the CNAME. TLS for graphcode.app terminates at Cloudflare, not at Pages, so the derived value is http://graphcode.app. An explicit url in _config.yml takes precedence over the derived one.

Change

One line in docs/_config.yml:

url: https://graphcode.app

Verified

Built locally with the Pages versions (Jekyll 3.10.0, jekyll-sitemap 1.4.0, jekyll-seo-tag 2.8.0), using only the committed config:

Output Before (live) After (local build)
sitemap.xml locations http://graphcode.app/… ×3 https://graphcode.app/… ×3
og:url on / and /compare.html http:// https://
canonical https:// https://, unchanged

Docs-only; no Swift touched.

GitHub Pages derives site.url from the CNAME, and because TLS terminates
at Cloudflare rather than at Pages it comes out as http://graphcode.app.
sitemap.xml and og:url inherited that scheme, so every URL a crawler
read cost it a 301. An explicit url wins over the derived one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@scgopi
scgopi merged commit d6d54c2 into main Sep 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant