Open pdpinch opened 2 years ago
@pdpinch is this issue still needed, or has it been completed?
Still needed.
https://draft.ocw.mit.edu/robots.txt returns 404 https://draft-qa.ocw.mit.edu/robots.txt returns 404 https://live-qa.ocw.mit.edu/robots.txt returns 404
https://ocw.mit.edu/robots.txt also returns 404, which is OK although perhaps not ideal.
@pdpinch @blarghmatey Would you kindly guide me a bit on where extacly to add the robot.txt, are there any reference PRs I could take a look ?
@blarghmatey I'm pretty sure that https://ocw.mit.edu/robots.txt worked at some point, but it's returning a 404 now. Did we ever have the vcl code committed for creating these robots.txt responses?
Is fastly vcl still the right place to do this?
The fastly VCL is still the right place. @shaidar can help point you at the right place to make the changes.
This is resolved now by https://github.com/mitodl/ol-infrastructure/commit/0d9724450ba6b7f62124ec5370186d75289c7fae
The TL;DR is that the wrong condition was being attached to the robots.txt response so it was never triggered.
That commit didn't end up resolving the issue as expected. The reason the robots.txt isn't being loaded is because of errors in the logic for how Pulumi/Terraform maps the request conditions to the synthetic responses. This will likely require pulling some of that logic directly into VCL instead of relying on the cache conditions and response object parameters in the ServiceVCL
definition.
User Story
Users don't want to get search results from google for live-qa.ocw.mit.edu or any of the other qa and draft servers
Acceptance Criteria
Allow: /
andSitemap: https://ocw.mit.edu/sitemap.xml