---
title: "JavaScript changes canonical, robots, title or description after load (seo/head-js-mutation)"
description: "seo/head-js-mutation: Google may skip rendering when raw HTML says noindex, and it compares raw vs rendered canonicals; non-rendering AI crawlers only ever…"
canonical: https://void-design.vercel.app/rules/seo/head-js-mutation
lastModified: 2026-09-16
---

# JavaScript changes canonical, robots, title or description after load

`seo/head-js-mutation` · severity **error** · category SEO · detected by `void seo` and `void audit`

## Why it matters

Google may skip rendering when raw HTML says noindex, and it compares raw vs rendered canonicals; non-rendering AI crawlers only ever see the raw values. Changed canonical/robots is an error, changed title/description a warning.

## How to fix it

Render head metadata on the server (metadata/generateMetadata) and don't set document.title or canonical links from client effects.

## References

- https://developers.google.com/search/docs/crawling-indexing/javascript/javascript-seo-basics

## More seo rules

`void seo` reports 60 rules in this category. What search engines need from the raw response: status codes, titles and descriptions in <head>, self-referencing canonicals, one h1, crawlable links, Open Graph, icons, robots.txt and a sitemap with real dates.

- `canonical-invalid` Canonical URL is relative or contains a fragment — [seo/canonical-invalid](https://void-design.vercel.app/rules/seo/canonical-invalid)
- `canonical-broken` Canonical points to a URL that returns 4xx/5xx — [seo/canonical-broken](https://void-design.vercel.app/rules/seo/canonical-broken)
- `canonical-conflict` Canonical target redirects, is noindex, or canonicalises elsewhere — [seo/canonical-conflict](https://void-design.vercel.app/rules/seo/canonical-conflict)
- `canonical-not-self` Canonical points to a different URL — [seo/canonical-not-self](https://void-design.vercel.app/rules/seo/canonical-not-self)
- `h1-count` Page doesn't have exactly one visible <h1> in the server HTML — [seo/h1-count](https://void-design.vercel.app/rules/seo/h1-count)
- `h1-title-mismatch` <h1> and <title> share little wording — [seo/h1-title-mismatch](https://void-design.vercel.app/rules/seo/h1-title-mismatch)
- `heading-skip` Heading levels skip (h2 → h4) or headings are empty — [seo/heading-skip](https://void-design.vercel.app/rules/seo/heading-skip)
- `img-alt-missing` <img> without an alt attribute — [seo/img-alt-missing](https://void-design.vercel.app/rules/seo/img-alt-missing)

Detected by `void seo` and `void audit`. Explain it in a terminal: `void rules seo/head-js-mutation`
