fix: certificate page being indexed in google search which should not be #3348
Merged
Conversation
OpenAPI ChangesNo changes detected Unexpected changes? Ensure your branch is up-to-date with |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a robots: { index: false } directive to the certificate page metadata so public certificate pages (which are shareable but should not be discoverable via search) are not indexed by search engines. standardizeMetadata spreads otherMeta last, so this override is correctly applied on top of the env-based default.
Changes:
- Set
robots: { index: false }ingenerateMetadatafor the certificate page, producing<meta name="robots" content="noindex">.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
https://github.com/mitodl/hq/issues/11232
Description (What does it do?)
Certificates should not be indexed by Google search. They are public, for ease of sharing, but they shouldn’t be searchable.
Screenshots (if appropriate):
How can this be tested?
For testing you should get connected with prod backend
NEXT_PUBLIC_MITOL_API_BASE_URL="https://api.learn.mit.edu"and visit the following url
http://open.odl.local:8062/certificate/course/8a2ebafe-40b3-4178-8860-ea9bd063f3cdand View page source you should see<meta name="robots" content="noindex"/>Additional Context