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

[feature] Add meta robots tag; allow robots to index profile card if user is Discoverable #842

Merged
merged 4 commits into from
Sep 29, 2022

Conversation

tsmethurst
Copy link
Contributor

@tsmethurst tsmethurst commented Sep 19, 2022

This PR adds more granular control over which endpoints robots are allowed to index.

By default, all web pages now have the following tag added to them:

<meta name="robots" content="noindex, nofollow">

This restricts search engines to not being able to index anything on the page.

However, if a user is Discoverable, then some limited indexing will be allowed of their profile page (but not their statuses or anyone else's statuses either).

In this case, the returned tag will be:

<meta name="robots" content="nofollow, noarchive, nositelinkssearchbox, max-image-preview:standard">

This allows the user's profile to be indexed, but not archived, and links will not be followed.

Currently, this won't make much difference for users, since by default users are not Discoverable, and there's no way of changing this right now aside from manually changing a value in the database. But in future it'll come in handy when users actually want their profiles to be discoverable by Google etc etc.

To support this, the robots.txt response has been reworked to Disallow all api/auth/well-known/file/s2s/panel stuff, instead of a blanket disallow of everything.

@tsmethurst tsmethurst marked this pull request as draft September 19, 2022 17:57
@tsmethurst
Copy link
Contributor Author

(converted this to a draft cuz we should merge it some time after 0.5.0 is out, not immediately)

@tsmethurst tsmethurst marked this pull request as ready for review September 29, 2022 10:02
@tsmethurst tsmethurst merged commit dd83ad0 into main Sep 29, 2022
@tsmethurst tsmethurst deleted the robots_txt_reworking branch September 29, 2022 10:03
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.

1 participant