In angular 2 how do you make the canonical tag in the index.html page dynamic so I can share page urls with social media.
This is it currently:
<link rel="canonical" href="https://mywebsite.co.uk">
In angular 2 how do you make the canonical tag in the index.html page dynamic so I can share page urls with social media.
This is it currently:
<link rel="canonical" href="https://mywebsite.co.uk">
This is not possible with angular 2 unless you are using angular universal. Are you using angular universal?
Also this may not be the correct direction. Typically the canonical tags are not for sharing a particular page but are designed to stop search engines from crawling deeper into a particular area of your site.
I think you are looking to adjust the meta tags dynamically for sharing on facebook and twitter. Which in that case you can review this article to find out more information https://moz.com/blog/meta-data-templates-123
© 2022 - 2024 — McMap. All rights reserved.