Metadata · 25 November 2026

Keep protected posts out of your meta descriptions

A password on a post hides the content from visitors. It does not automatically hide it from the code that writes your meta description, your share card or your structured data.

By Shane Rounce · 2 minute read

The leak

WordPress has three kinds of content that the public should not read in full: password-protected posts, private posts, and previews of drafts. The template shows a password form or a 404 in place of the content.

But the page head is built by different code. An SEO plugin that makes a description from the first lines of the post will read the post's content directly, not what the visitor is shown. If nobody has thought about it, the opening of your protected post ends up in:

  • the meta description, which search engines may show as the snippet
  • the Open Graph and Twitter description, which appears wherever the link is shared
  • JSON-LD structured data, as the description or the article body

A preview link is the sharpest case. Previews exist so that someone can read a draft before it is public. Paste that link into a chat tool and the tool fetches the page and unfurls a card. If the card is built from the draft's content, the draft has just been published to that conversation's history.

How to check

  1. Set a password on a post that has a recognisable first sentence.
  2. Open it in a private window, so you are signed out and have not entered the password.
  3. View the source and search for that sentence. Check the description meta tag, the og:description and twitter:description tags, and any application/ld+json block.
  4. Do the same with a private post while signed out, and with a preview link.

If the sentence appears anywhere, the page head is leaking.

What Ace Crawl Enhancer does

Since version 1.0.95 the plugin keeps password-protected, private and preview content out of public descriptions, social metadata and structured data. For those posts the content-derived parts of the head are left out.

The plugin also follows the site-wide setting. WordPress core reacts to "Discourage search engines from indexing this site" with a noindex tag and a line in robots.txt. A plugin that adds sitemaps, sitemap links and structured data adds discoverability that core does not know how to switch off. Ace Crawl Enhancer honours that one setting everywhere, so a staging site with the box ticked stops advertising itself through every route at once.

One more place to look: robots.txt on disk

WordPress generates robots.txt through a filter. That only works while no real file exists. A robots.txt file sitting in the web root is served by the web server before PHP runs, so no plugin setting can change it. A stale one left over from a migration will silently override every crawl setting you make.

The plugin looks for that file and shows a notice when it finds one. To check by hand, look in the folder your site is served from. If there is a robots.txt there, open it and decide whether it should still exist.

The rule

Whatever hides content from visitors has to hide it from the page head too. Test signed out, and read the source, not the page.

All notes Get the latest release