Serve sitemap and og:url over https - #340
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sitemap.xmland every page'sog:urlon graphcode.app sayhttp://, so each URL a crawler reads costs it a 301 tohttps://.GitHub Pages derives
site.urlfrom the CNAME. TLS for graphcode.app terminates at Cloudflare, not at Pages, so the derived value ishttp://graphcode.app. An expliciturlin_config.ymltakes precedence over the derived one.Change
One line in
docs/_config.yml: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:
sitemap.xmllocationshttp://graphcode.app/…×3https://graphcode.app/…×3og:urlon/and/compare.htmlhttp://https://canonicalhttps://https://, unchangedDocs-only; no Swift touched.