[feature] Add meta robots
tag; allow robots to index profile card if user is Discoverable
#842
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.
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:
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:
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.