Skip to content

Allow master docs to remove from Google search results#1723

Closed
svekars wants to merge 1 commit intositefrom
remove-master-robots
Closed

Allow master docs to remove from Google search results#1723
svekars wants to merge 1 commit intositefrom
remove-master-robots

Conversation

@svekars
Copy link
Collaborator

@svekars svekars commented Sep 6, 2024

We want to unlist this page in Google: https://pytorch.org/docs/master/community/contribution_guide.html - because it goes to the master docs and we want it to go the stable or main docs. The existing way of just unlisting with robots.txt did not give the desired result - the master docs version appeared as a first result in the search. Google suggests to use the nonindex to unlist pages.

I have added the noindex tag to all master docs: pytorch/docs#10

For this change to take effect, we need to allow master docs in robots.txt according to this official Google recommendation:
https://support.google.com/webmasters/answer/7489871?hl=en#zippy=%2Cthis-is-my-site%2Cthe-page-is-blocked-by-robotstxt

At the moment, while the master docs have noindex tag, I still see this as my first result in Google for "PyTorch Contributor Guide":

Screenshot 2024-09-06 at 3 41 38 PM

If you click on Learn Why, it would take you to the aforementioned support.google.com page that suggest to remove the disallow rule from robots.txt.

@netlify
Copy link

netlify bot commented Sep 6, 2024

👷 Deploy Preview for pytorch-dot-org-preview processing.

Name Link
🔨 Latest commit e5c5172
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-dot-org-preview/deploys/66db858471cf290008eaf120

@svekars svekars changed the title Allow master docs to remove from Google Allow master docs to remove from Google search results Sep 6, 2024
@malfet
Copy link
Contributor

malfet commented Sep 6, 2024

Perhaps I misunderstand something, but changes introduced in pytorch/docs#10 will be overwritten by the next doc build, wouldn't they?

Also, particularly in case of https://pytorch.org/docs/master/community/contribution_guide.html we prefer latest documentation to ones that is mentioned in release docs

@malfet
Copy link
Contributor

malfet commented Sep 9, 2024

Sorry, I misunderstood an intention of this PR, this is to hide docs for deprecated master branch as PyTorch/docs have migrated to main as default branch name.

In that case, would a symlink from master to main be a better solution?

@svekars
Copy link
Collaborator Author

svekars commented Sep 9, 2024

We will create a symlink instead as suggested

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.

2 participants