Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#51394 closed feature request (wontfix)

Keeping archived content out of Sitemap

Reported by: marisol3007's profile marisol3007 Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Sitemaps Keywords:
Focuses: Cc:

Description

Hi

WP55' own sitemap.xml lists (I suppose) "almost everything except deleted", where "deleted" means "404" or "410". So far so good.

But between "online" and "deleted" there should be one more state:
archived, say: still online, but kept out of sitemap.

This is needed to keep pages/blog longterm-readable for those who know the adress, or those who perform a search inside the website - but no more. It's found typically in newspapers, where you should be able to read a 3 years old retired paper (a scientific report shown to be wrong, for ex.), no longer wanted to be listed in 3rd-party search engines like google.

Could you provide this sitemap behaviour with WP56 please?

Regards
Mike

Change History (3)

#1 @sabernhardt
5 years ago

  • Component changed from General to Sitemaps
  • Summary changed from Archived <=> Sitemap to Keeping archived content out of Sitemap

@marisol3007 Hi and thanks for the ticket!

In this case, I recommend using a plugin. There are several SEO plugins that can help restrict content in an XML sitemap, and they also can tell search engines not to index those pages if the crawler finds them another way.

(Technically, the wp_sitemaps_posts_query_args filter can remove posts from the standard sitemap when they're assigned a specific tag whose ID is set as the tag__not_in value in the filter. However, that only adjusts the sitemap, and it requires some familiarity with adding filters.)

#2 @marisol3007
5 years ago

Well, ok. But handling tags and filters is not my taste: too complicated.
This plugin workaround did the job:

  • Jeff Starr's Disable WP Sitemap (carefree)
  • Papin Schipper's Companion Sitemap Generator (some settings needed)

There are maybe other good sitemap plugins suitable for you (take one fitting your needs).
This workaround is nothing else than going back to old styled Before-WP55.
Regards, Mike

#3 @SergeyBiryukov
5 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Thanks for the follow-up!

Closing for now, as core doesn't really have a concept of archived content out of the box, so this seems like plugin territory. As noted above, there are plugins for more flexible sitemap management.

Note: See TracTickets for help on using tickets.