Automatically create rel=canonical for each page when it is published
Hi
I'm trying to find out if there's a way to automatically publish a rel=canonical tag for each page in our web sites? Currently we're asking clients to do this manually, but they are busy and forget - it's understandable.
Feels like it's such an obvious requirement for SEO that there must be a straightforward way to do it without the web editor needing to do anything except publish their page?
Might not be the answer you are looking for, but SEOChecker does this automagically. Specify domain name in seochecker settings and use the SEOChecker API to generate all the metatags at once with two lines of code.
Automatically create rel=canonical for each page when it is published
Hi
I'm trying to find out if there's a way to automatically publish a rel=canonical tag for each page in our web sites? Currently we're asking clients to do this manually, but they are busy and forget - it's understandable.
Feels like it's such an obvious requirement for SEO that there must be a straightforward way to do it without the web editor needing to do anything except publish their page?
Thanks, John
Place the following in the head section of the Master Template for your pages.
Thanks Marc, we'll have a bash with that, much appreciated! jd
Hi Marc,
That works like a Charm. Thank you!
The only issue I have now is that my homepage is showing with a trailing "/home" in my head.
How can I exclude Model.Content.Url if it = "/home"
For this to work you need to make sure that your website can only be served via a single domain.
For example if you have website.com and website.org both pointing to your site you want to make sure that your site is always served via website.com
If someone visits website.org you should redirect to website.com
The following guide explains how to set this up via the web.config file located at the route level of your website:
https://uskinned.net/blog/posts/2017/june/quick-tip-assign-multiple-hostnames-to-the-one-production-domain-correctly/
Might not be the answer you are looking for, but SEOChecker does this automagically. Specify domain name in seochecker settings and use the SEOChecker API to generate all the metatags at once with two lines of code.
https://soetemansoftware.nl/seo-checker
Best,
Richard
You can use also Umbraco built in option
is working on a reply...