# Page is set to “noindex” in Vanilla JS

> How to fix page is set to “noindex” in Vanilla JS — with the exact fix and copy-paste code.

_Category: Search visibility · Detector `seo` · Check `noindex` · Severity: error_

A `<meta name="robots" content="noindex">` tells search engines to leave the page out of results entirely — the single most damaging SEO mistake because the page simply disappears. It is very often a leftover from a staging or “coming soon” environment that shipped to production. If it is not deliberate, it is an emergency.

## The fix for Vanilla JS

Only inject the `noindex` tag (or `X-Robots-Tag` header) in staging; strip it from production builds.

```html
<!-- staging only; must not ship to production -->
<meta name="robots" content="noindex" />
```

### Steps

1. Search the codebase for “noindex” (meta tag and `X-Robots-Tag` header)
2. Ensure production never emits it; gate it strictly to non-prod
3. Request re-indexing in Search Console once removed

## How VibeCheck detects it

The `seo` detector flags this live in the browser and reports it to the widget's Problems list — and to your coding agent over MCP.

- **Issue string:** `Page is set to "noindex"`
- **Threshold:** <meta name="robots" content> includes 'noindex'

## FAQ

### How fast will my page come back after removing `noindex`?

It returns on the next crawl, which can be hours to weeks. Request indexing in Google Search Console to speed it up once the tag is gone.

### Is there a header version of `noindex` I might be missing?

Yes — the `X-Robots-Tag` HTTP header does the same thing and is easy to overlook. Check your server/CDN config as well as the meta tag.

### What is the correct tag for pages I do want indexed?

You do not need any robots tag for the default indexable behaviour. Only add a robots meta when you specifically want to restrict indexing.

See the general, framework-agnostic fix: https://vibecheck.wcgw.fun/fix/accidental-noindex.md

---

Fix guide from VibeCheck — https://vibecheck.wcgw.fun/fix/accidental-noindex. Full site index for LLMs: https://vibecheck.wcgw.fun/llms.txt
