Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create dynamic robots.txt page #5794

Merged
merged 2 commits into from
Jan 28, 2020
Merged

Conversation

benhalpern
Copy link
Contributor

@benhalpern benhalpern commented Jan 28, 2020

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

This PR moves robots.txt from the totally static public folder to an action where code and env vars are available.

This is needed to point robots to the new place for our sitemap download and enable any further dynamic elements in the sitemap.

I also took the moment to add a few new Disallow: lines to avoid crawling of a few unnecessary pages which either result in errors or result in an endless list of endpoints which don't need indexing.

If you're reviewing this, just double check the format of the new lines to make sure it is appropriate when checked against instructions for robots.txt. We definitely don't want to accidentally instruct the bots to not crawl important pages.

This endpoint will be cached, so for all intents and purposes it will be as if it is static. It will rarely change, so we will have to cachebust it manually if we do change it, but it will also fade from the cache on its own every 24 hours and be re-fetched cold from origin, which I think is fine.

@benhalpern benhalpern requested a review from a team January 28, 2020 20:36
@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Jan 28, 2020
Copy link
Contributor

@mstruve mstruve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it!

@pr-triage pr-triage bot added PR: reviewed-approved bot applied label for PR's where reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Jan 28, 2020
Copy link
Contributor

@maestromac maestromac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@benhalpern benhalpern merged commit 82f2281 into master Jan 28, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: reviewed-approved bot applied label for PR's where reviewer approves changes labels Jan 28, 2020
@rhymes rhymes deleted the ben/make-robots-txt-dynamic branch January 28, 2020 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants