Reputation: 1541
For a reason I can't modify the html head for the rel="canonical".
How to I inject rel="canonical" using javascript and does search engine accept the this type of injection?
Upvotes: 1
Views: 358
Reputation: 163603
You can modify the DOM within the <head>
tag just as you can anything else. However, it won't do you much good. Crawlers/bots generally don't run your JavaScript.
Upvotes: 1