Feat: add missing AI search crawlers and serve robots.txt at root - #2887
Feat: add missing AI search crawlers and serve robots.txt at root#2887immortalcodes wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2887 +/- ##
=======================================
Coverage 74.14% 74.14%
=======================================
Files 19 19
Lines 2352 2352
=======================================
Hits 1744 1744
Misses 608 608
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR updates crawler directives and delivery for robots.txt, aiming to improve AI-crawler discoverability while eliminating the previous /robots.txt redirect behavior.
Changes:
- Add additional AI-related user agents to
robots.txtand refresh the “Last updated” header. - Remove the
redirects.yamlentry that redirected/robots.txtto/static/files/robots.txt. - Ensure
robots.txtis included in the built rock image.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
webapp/views.py |
Updates the Google Ads verification docstring to reflect “dedicated route” behavior (no longer referencing robots redirects). |
rockcraft.yaml |
Packages robots.txt into the rock image (flask/app/robots.txt). |
robots.txt |
Adds missing AI crawler user agents and updates the last-updated date. |
redirects.yaml |
Removes the /robots.txt redirect rule. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # Hiring blog redirect | ||
| blog/how-we-hire-at-canonical: /careers/hiring-process | ||
|
|
Done
Previously
/robots.txtwas a 302 redirect to/static/files/robots.txt, which tells crawlers to re-check the original location every crawl cycle (a wasted request per cycle).QA
Fixes
WD-38045.