Skip to main content

Google clarifies canonical URL best practices for JavaScript

Google updated some more JS documentation (opens in a new tab), this time to clarify canonicalization best practices for JavaScript:

You can use JavaScript to set the canonical URL, but keep in mind that you shouldn't use JavaScript to change the canonical URL to something else than the URL you specified as the canonical URL in the original HTML. The best way to set the canonical URL is to use HTML, but if you have to use JavaScript, make sure that you always set the canonical URL to the same value as the original HTML. If you can't set the canonical URL in the HTML, then you can use JavaScript to set the canonical URL and leave it out of the original HTML.
Tamara
December 15, 2025

Google updated its JavaScript docs on noindex, saying rendering behavior is not well defined. Skip noindex in original code if you might want indexing.

Tamara
December 15, 2025

Ahrefs analyzed 75K brands across ChatGPT, AIO, and AI Mode. YouTube mentions correlated most with AI mentions, while website page count showed almost no link.

Tamara
December 12, 2025

Google is testing Disco, an experiment that uses open tabs and chat history to help people browse and build no-code tools. A waitlist is open for GenTabs.

Tell us what you need help with.