Skip to content

Add robots.txt with absolute Sitemap URL#161

Open
alexwolson wants to merge 1 commit into
mainfrom
fix/robots-txt-sitemap-url
Open

Add robots.txt with absolute Sitemap URL#161
alexwolson wants to merge 1 commit into
mainfrom
fix/robots-txt-sitemap-url

Conversation

@alexwolson

Copy link
Copy Markdown
Collaborator

Summary

  • Lighthouse flagged robots.txt as invalid: the Sitemap: directive was a relative path (/sitemap.xml), which violates the spec requiring an absolute URL.
  • No robots.txt existed in this repo — it's auto-generated by the jekyll-sitemap gem with a relative Sitemap URL. Adding a root-level robots.txt overrides that default with the correct absolute URL.

Fixes #160

Test plan

  • After merge/deploy, confirm https://civictech.ca/robots.txt serves the new content (Sitemap: https://civictech.ca/sitemap.xml)
  • Re-run Lighthouse SEO audit and confirm "robots.txt is valid" passes

🤖 Generated with Claude Code

jekyll-sitemap's default generated robots.txt uses a relative Sitemap
path ("/sitemap.xml"), which is invalid per spec - the directive
requires an absolute URL. A root-level robots.txt overrides the
gem's generated one.

Fixes #160

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@alexwolson
alexwolson requested a review from Khasir July 21, 2026 23:01
@github-actions

Copy link
Copy Markdown
Contributor

Pa11y Accessibility Report

All pages passed — 0 warning(s) (WCAG2AA)


Homepage

✅ No issues found.


Event

✅ No issues found.


Project

✅ No issues found.


Person

✅ No issues found.


Organization

✅ No issues found.


Venue

✅ No issues found.


Resource

✅ No issues found.


Tag

✅ No issues found.


Category

✅ No issues found.

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.

robots.txt Sitemap directive uses a relative URL (should be absolute)

1 participant