Should the canonical tag be added with JavaScript?
Rubric check: canonical that only appears after JavaScript (check id js_only_canonical)
No. Put the canonical in the HTML your server sends. If it only appears after JavaScript runs, crawlers that don't run scripts never see it, and Google may read it late or not at all.
Why it matters for SEO
Google's JavaScript guide recommends setting the canonical in the HTML. A script-only canonical relies on Google rendering the page, which can happen later than the first crawl.
Crawlers that don't run JavaScript see a page with no canonical. Then they choose the main URL themselves, which can split signals across duplicates.
Does this matter for ChatGPT and AI Overviews?
Most AI crawlers read the server HTML only. A canonical added by script is invisible to them, so they can't tell which URL is the main version of the page.
The effect depends on how many duplicate URLs the page has. With tracking or filter parameters, it can matter.
How Rubric scores it
StandardStandard checks are the baseline every other tier is measured against.
Why this tier: Canonical invisible without JS.
It is judged on every page Rubric scores.
Every Rubric score starts at 100. When this check fails, it takes up to 12 points off. Even one failing page costs at least 6 points (half of the most), and the rest comes off as the share of affected pages grows. A warning costs less than a failure.
This check doesn't cap your score. It only takes off its own points.
From the engine's scoring files, scoring 2026-v2.1 (engine d5c591d).
How common it is
Found on 6 of 277 sites where Rubric could judge it (2.2%). That is 6 of 265 judged sites in Rubric's 313-site test set and 0 of 12 sites audited on Rubric between 11 Nov 2026 and 17 Nov 2026 under the current check rules (scoring 2026-11k or later). Measured 17 Nov 2026 with scoring 2026-v2.1.
How accurate the check is
Lab test: passed. On test pages built with this problem, it caught 3 of 3. On clean test pages, it stayed quiet 2 of 2 times. (Engine build bbcec7c.)
Real sites: people checked 10 of its findings by hand and 3 were wrong (30%). Last checked 14 Nov 2026. That's a small sample, so treat the rate as rough.
Latest review round: 0 of 18 findings judged were still wrong after the last fix.
Lab as of 16 Nov 2026; judged findings as of 15 Nov 2026.
How to fix it
WordPress
- View the page source (not the browser's Elements panel) and search for
rel="canonical". - Standard WordPress with Yoast or Rank Math prints the canonical on the server. If it's missing, a caching, headless or optimisation setup may be stripping it. Clear the cache and check again.
- Turn on your SEO plugin's canonical output if it was turned off.
Shopify
- Search View page source for
rel="canonical". - If it's missing, go to Online Store > Themes > Edit code, open
theme.liquidand add inside<head>:<link rel="canonical" href="{{ canonical_url }}">. - Remove any app script that adds a canonical in the browser.
Webflow
- Webflow prints the canonical in the server HTML when Site settings > SEO > Global canonical tag URL is set.
- Set it to your live https domain and publish.
- Remove any script in custom code that adds a canonical after load.
Custom code
Render it in the server response:
<link rel="canonical" href="https://example.com/page">In single-page apps, set the canonical through server-side rendering or static generation. Check with curl -s https://example.com/page | grep -i canonical.