Earlier this week, I noticed Google made another tweak to its JavaScript SEO best practices document. This time, they focused on clarifying canonicalization best practices. In essence, Google suggests that setting the canonical URL to match the URL in the original HTML is crucial. If that’s not possible, it’s better to leave the canonical URL out of the HTML altogether.
Google’s New Additions. Google introduced a fresh section that explains:
“The rel=‘canonical’ link tag helps Google identify a page’s canonical version. While you can use JavaScript for this, it shouldn’t alter the canonical URL from what’s set in the original HTML. Ideally, use HTML to set it, but if JavaScript is necessary, ensure the JavaScript sets it identically to the HTML. If HTML isn’t an option, use JavaScript and omit the canonical URL in the HTML.”
Understanding Google’s Stance on Noindex. They also issued a warning earlier regarding noindex tags—advising not to use them in the original page code if you want the page indexed.
Why This Matters to Me. If I rely on JavaScript for setting canonical links, Google’s advice is to verify its recognition through the Google Search Console’s URL Inspection tool. It’s a great reminder to review these updated best practices, especially if JavaScript plays a crucial role on my site.
Inspired by this post on Search Engine Land.


Leave a Reply