Skip to content
  • Texas | Arizona | Virginia | Idaho | Illinois
  • (888) 705-0930
  • info@therawragency.com
Facebook-f Twitter Instagram Linkedin-in
rawr logo short
  • Home
  • About
  • Solutions
  • Industries
  • Services
  • Blog
  • Contact
colorized icons 04
B2B Marketing
colorized icons 05
B2C Marketing
colorized icons 06
Online Visibility Management
colorized icons 07
Healthcare
colorized icons 08
Manufacturing
colorized icons 10
Home Services
colorized icons 09
Professional Services (B2B)
colorized icons 11
Retail
colorized icons 01
Brand Strategy
  • Graphic Design
  • Corporate Brand Identity
  • Sales Enablement
  • Editorial Calendar Management
colorized icons 02
Website Design
  • WordPress Website Development
  • Conversion Rate Optimization
  • eCommerce Development
  • Content Strategy & Copywriting
colorized icons 03
Digital Marketing
  • Digital Marketing Strategy
  • Search Engine Optimization (SEO)
  • Pay-Per-Click (PPC) Management
  • Content Marketing & Digital PR
  • Account Based Marketing (B2B)
  • Marketing Automation
  • Social Media Management
Let's Talk

Google documents how to inject canonical tags using JavaScript

google inject canonical tags using javascript
  • June 30, 2022
  • Uncategorized
  • Agency
Facebook
Twitter
LinkedIn
Email

Google has updated its JavaScript SEO help document to add technical details on how to inject canonical link tags using JavaScript. Google added a new section titled “properly inject rel=”canonical” link tag.”

What is new. Here is the new section where Google recommends not to implement your canonical tags using JavaScript, but if you must, Google explains this is the proper way to do so. Google wrote:

While we don’t recommend using JavaScript for this, it is possible to inject a rel=”canonical” link tag with JavaScript. Google Search will pick up the injected canonical URL when rendering the page. Here is an example to inject a rel=”canonical” link tag with JavaScript:

Google added this warning stating “When using JavaScript to inject the rel=”canonical” link tag, make sure that this is the only rel=”canonical” link tag on the page. Incorrect implementations might create multiple rel=”canonical” link tag or change an existing rel=”canonical” link tag. Conflicting or multiple rel=”canonical” link tags may lead to unexpected results.”

Hit or miss. We have seen cases where Google can pick up these canonical tags or other embedded elements, even structured data, using JavaScript. But it can be hit or miss, so it is recommended that if you are going to use JavaScript specifically to inject your canonical tags, follow these directions precisely.

Why we care. Again, if you are injecting canonical tags using JavaScript, Google has finally officially documented the proper way to implement it. So check the documentation over here and make sure your implementation follows Google’s recommendations.

The post Google documents how to inject canonical tags using JavaScript appeared first on Search Engine Land.

Source: Search Engine Land

Facebook
Twitter
LinkedIn

Recent Blog Posts

Navigating Supply Chain Disruption: Harnessing Innovation in Turbulent Times

December 4, 2023

Transform Your Patient Experience

November 28, 2023

Unleashing the Potential: The Revolutionary Impact of Artificial Intelligence (AI) in Healthcare

November 6, 2023

Empowering Patients through Online Communities/Enhancing Engagement with The RAWR Agency

October 20, 2023

Sustainable Manufacturing: Advancing Net Zero and ESG Goals in 2023

October 6, 2023
View More
rawr logo short
Facebook-f Twitter Instagram Linkedin-in
Get In Touch
  • Texas | Arizona | Virginia | Idaho | Illinois
  • (888) 705-0930
  • info@therawragency.com
Send An Email

"*" indicates required fields

This field is for validation purposes and should be left unchanged.

Copyright 2023 | The RAWR Agency, LLC. |

Sitemap | Privacy Policy