Skip to content

All checks / Technical

noindex set via JavaScript (undefined behavior)

Google has clarified that using a noindex directive in JavaScript-rendered content has undefined behavior that may change.

Critical noindex-in-javascript

In SEOCode's checks since 9 May 2026


Why this matters.

Google has clarified that using a noindex directive in JavaScript-rendered content has undefined behavior that may change. While Google may be able to render a page that uses JavaScript, if there is any possibility you want the page indexed, do not use a noindex tag in the original page code or inject it via JavaScript. If you intend to block indexing, place the noindex directive in the original static HTML.

Runs on .jsx .tsx .vue .svelte · Critical checks fail the pull request status, so the change cannot merge until it is fixed.


How to resolve it.

Move noindex out of JavaScript and into the static HTML: <meta name="robots" content="noindex" /> inside <head> in the original HTML response. Do not rely on JavaScript to inject or conditionally set noindex.

SEOCode writes this fix for you

On a pull request the fix arrives as a suggestion you can commit in one click, when the change is unambiguous on the line.


Where this comes from.

01

Javascript Seo Basics

developers.google.com

Using a framework? Next.js · SvelteKit · Nuxt



Every check, on every pull request.

SEOCode runs the full ruleset on each change and comments the fixes inline.

Free for public repositories · no credit card