Issues

JavaScript: Canonical Only in Rendered HTML

back to issues overview

Canonical Only in Rendered HTML

Pages that contain a canonical only in the rendered HTML after JavaScript execution.

Google can process canonicals in the rendered HTML, however they do not recommend relying upon JavaScript and prefer them earlier in the raw HTML.

Problems with rendering, conflicting, or multiple rel=”canonical” link tags may lead to unexpected results.

How to Analyse in the SEO Spider

Enable JavaScript rendering mode via ‘Config > Spider > Rendering’ and select ‘JavaScript’ to crawl JavaScript websites.

View URLs with this issue in the ‘JavaScript’ tab and ‘Canonical Only in Rendered HTML’ filter, and export all URLs using the ‘Export’ button.

The ‘HTML Canonical’ column shows the canonical URL found in the original HTML before JavaScript.

The ‘Rendered HTML Canonical’ column shows the canonical URL found in the rendered HTML after JavaScript has been processed.

Read our tutorial on ‘How To Crawl JavaScript Websites‘.

What Triggers This Issue

This issue is triggered when pages only contain a canonical link in the raw HTML after JavaScript execution.

For example:

https://www.screamingfrog.co.uk/technical-seo/

Does not have a canonical link element in the raw HTML, but after JavaScript execution, contains the below canonical link element:

<link rel="canonical" href="https://www.screamingfrog.co.uk/technical-seo/" />

How To Fix

Include a canonical link in the raw HTML (or HTTP header) if feasible to ensure Google can see it and avoid relying only on the canonical in the rendered HTML only.

Further Reading

Back to top