Back to lessons

Hosting Operations

Find Pages Marked noindex

You need to identify generated HTML pages that contain noindex directives.

Command

grep -Rni --include='*.html' 'noindex' public

What changed

Nothing changes. The command searches generated HTML for noindex.

Danger

safe

When to use it

Use before launch, after moving draft pages, or when a page is not appearing in search.

When not to use it

Do not assume every noindex is wrong; some pages should intentionally stay out of search.

Undo or recovery

No undo needed because this command is read-only.

Expected output

Matching file paths and lines containing noindex.

demo script

Disposable terminal steps

  1. find public -name '*.html' -print
  2. grep -Rni --include='*.html' 'noindex' public

simulated output

What it looks like

disposable vessel
::fixture-ready::
$ find public -name '*.html' -print
public/about.html
public/draft.html
public/blog/post.html
public/index.html
::exit-code::0
$ grep -Rni --include='*.html' 'noindex' public
public/draft.html:4:
::exit-code::0

YouTube Short

Catch leftover noindex.

Before launch, search the built HTML for noindex so draft metadata does not hide a real page.

LinkedIn hook

A leftover noindex can hide a page after launch.

Question: Do you audit noindex before publishing a static site?

experiments

A/B tests to run

Metric: share_rate

A: Leftover noindex.

B: Launch checklist noindex check.