Skip to content

Add noindex to pages under badge.buildkite.com #2567

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

Merged
merged 2 commits into from
Nov 22, 2023

Conversation

hannahcancode
Copy link
Contributor

@hannahcancode hannahcancode commented Nov 21, 2023

✨ I am not precious about my ruby so please correct if there's a better way to do this ✨

Add noindex when served under badge.buildkite.com

  • we have an issue currently where we are accidentally serving docs under badge.buildkite.com
  • this actually isn't too much of an issue except that google found it, crawled it and indexed it
  • there was an initial fix (https://github.com/buildkite/ops/pull/1777) to just remove badge.buildkite.com/docs, but that meant that google had indexed what was now a bunch of 404s, which is also kind of a bad look.
  • that fix was reverted, and there was a change to add a canonical ref: 🔍 Canonical URL #2452 - which is great, but our SEO consultant has recommended that we also add an explicit noindex to the badge.buildkite.com/docs, so google will stop indexing them at all.
  • once google has removed the badge.buildkite.com/docs pages from their index, we can then do either/or of:
    • adding badge.buildkite.com/docs as a disallow to our robots.txt in bk/site (or in badge.buildkite.com/robots.txt? subdomains might be their own thing...)
    • removing the badge.buildkite.com/docs domain as a whole
  • for both of these we'll want to wait until google has de-indexed these pages though, or they'll stick around as zombies 🧟

@hannahcancode hannahcancode requested a review from a team November 21, 2023 22:46
@buildkite-docs-bot
Copy link
Contributor

Preview URL: https://2567--bk-docs-preview.netlify.app

Copy link
Contributor

@mbelton-buildkite mbelton-buildkite left a comment

Choose a reason for hiding this comment

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

TIL https://badge.buildkite.com/docs. Looks good to me if looks good to @dannymidnight 😊

@@ -40,7 +40,7 @@

<%= render 'analytics', application: 'docs', title: "Docs / #{content_for(:page_title)}", logged_in: probably_authenticated? %>

<% if ENV.fetch("ROBOTS_NO_INDEX") { "false" } == "true" %>
<% if ENV.fetch("ROBOTS_NO_INDEX") { "false" } == "true" || request.base_url == "https://badge.buildkite.com" %>
Copy link
Contributor

Choose a reason for hiding this comment

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

hi @hannahcancode as a thought, should we address the https://badge.buildbox.io domain as well?

Currently https://badge.buildbox.io also lands the user on the Docs site. It's also indexed in Google.

Acknowledging this PR specifically addresses the badge. subdomain. Over to you to decide the scope of this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh good callout @olyism, I didn't even know about badge.buildbox.io. I suspect it's not as big an issue because it doesn't pollute buildkite.com in the google index, but seems sensible to get rid of it too. I'll push up something for that.

@hannahcancode
Copy link
Contributor Author

I'm now crowdsourcing my ruby: https://buildkite-corp.slack.com/archives/C05NAGJREJU/p1700609961943819

Copy link
Contributor

@dannymidnight dannymidnight left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks for the detailed PR @hannahcancode.

@hannahcancode hannahcancode merged commit d288f80 into main Nov 22, 2023
@hannahcancode hannahcancode deleted the ga-616-badgebuildkitecom-subdomain branch November 22, 2023 00:11
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.

5 participants