Canonical added by JavaScript

javascript.js_injected_canonical
Priority
Medium
Severity
Critical

What we look for

The HTML the server sends for these pages has no canonical tag (the line in <head> naming the preferred address); one appears only after the page's JavaScript runs in a browser.

Why it matters

Search engines that read only the server's HTML never see the tag, and Google sees it only when it renders the page, so it may choose the preferred address itself.

How to fix

Put the canonical tag in the HTML the server sends, through the page template, your framework's server rendering or an SEO plugin, instead of adding it with a script.

Where you’ll see it

The id is stable, and every surface uses it, so it’s the thing to search for or hand to an agent.

Terminal
When it is one of the five findings under Fix first, raptor crawl prints the id under it.
Check: javascript.js_injected_canonical
crawl.json and the CSV
The crawl JSON names the finding by this id, and so do the CSV and raptor_query.
"check_id": "javascript.js_injected_canonical"
The HTML report
This link opens the finding in the report, and each finding shows its id.
crawl.html#finding=javascript.js_injected_canonical
MCP
raptor_findings with this check_id returns the finding in full, with a fix brief ready to paste into a task. If it didn’t fire, it says why.
raptor_findings {
  "job_id": "...",
  "check_id": "javascript.js_injected_canonical"
}