[wp-trac] [WordPress Trac] #52536: Add "X-Robots-Tag: noindex" to feeds by default
WordPress Trac
noreply at wordpress.org
Mon Jan 8 04:05:14 UTC 2024
#52536: Add "X-Robots-Tag: noindex" to feeds by default
-------------------------+------------------------------
Reporter: pikamander2 | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Feeds | Version:
Severity: major | Resolution:
Keywords: | Focuses:
-------------------------+------------------------------
Comment (by peterwilsoncc):
IN [attachment:"52536-poc.diff"] I've created a very rough POC that sets
the `X-Robots-Tag` header according to the values in the default meta tag.
By default this adds the noindex header to search feeds via the existing
`wp_robots_noindex_search` function included on the `wp_robots` filter.
On the downside, the HTTP headers are output much earlier than the meta
tag so there is some risk of contradictory settings between the HTTP
header and meta tag if a plugin alters the value after the HTTP headers
are sent.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/52536#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list