brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: an HTML noindex meta tag keeps one page out of search results

Html
~/tips/tip-html-meta-robots-noindex

cat ~/tips/tip-html-meta-robots-noindex.md

Ask search engines not to list a thank you page or a draft.

Not every page deserves to be found. Thank you pages, internal search results and test pages are the ones I would keep out of Google.

Put this in the head of that one page:

<meta name="robots" content="noindex">

Crawlers that honour the rule will drop the page from results after they visit it again, even if other sites link to it. For files without a head, such as a PDF, the same thing can be sent as a response header:

X-Robots-Tag: noindex

The trap that catches people: do not also block the page in robots.txt. A crawler that may not fetch the page never sees your noindex, so the address can still show up because of links elsewhere. Allow crawling and let the tag do its work.

It is a polite request to search engines and it protects nothing. Anyone with the link can open the page, so private content needs a login. Removal also takes as long as it takes for the next crawl. And check your templates, because a noindex left over from a staging site on the live one is a quiet way to disappear.

Further reading: Google Search Central: block indexing with noindex

More Html tips import { format } from "dates"; width="640" height="360" poster="demo.jpg"> The HTML optgroup element puts headings inside a long dropdown srclang="en" label="English" default> title="Example blog" href="/feed.xml"> All Html tips (14) All topics

Link