Copy link to clipboard
Copied
Version: RoboHelp 2019
Output: Responsive HTML5
Hello - I'm looking for some guidance on how to add a canonical link/url tag into robohelp topics. We publish our help to several production platforms and Google search finds all the duplicate help files. In an effort to optimize search results, we want to insert a canonical url tag into the header section of each help topic to tell google that there may be multiple copies of the same file, and then add the full url/path to one platform as the primary version.
Does anyone have experience with this that you can share? Is there a way to define the platform base URL in one place and then use it in all topics automatically?
Copy link to clipboard
Copied
I don't have any experience with canonical URLs, but if I want to include a javascript in all topics I add it in the master page header section (don't confuse this with the html head section). That would be the first place I'd investigate.
Copy link to clipboard
Copied
Or. There's "Generate XML Sitemap" in the output settings, which perhaps is what you need? It mentions a Base URL, at any rate. (I was looking for something else and stumbled across it.)
Copy link to clipboard
Copied
Thank you, Amebr, for the replies. We do generate sitemaps with the Base URL but not sure that's unrelated to the canonical tag.
Copy link to clipboard
Copied
that should read "not sure that's related to the canonical tag"
Copy link to clipboard
Copied
Yeah not sure myself, but I came across it shortly after reading this post, so thought I'd mention it in case it helped. 🙂
Copy link to clipboard
Copied
We're looking for the same now in RH 2022 and for Frameless output.
Usually, when we want to add something to all topics we're putting it in the <head> section of the master page(s) that those topics will use for output generation. Worked for <script> tags (e.g. to implement a cookie consent tool) but led to duplicate insertion in all topics. Kind of ugly and considered to be not nice coding style, but works nevertheless. So the master page is the place for adding stuff
For outruling duplicate content the canonical attribute needs to be placed in a <link> tag in the <head> section of a topic, containing a href="...", which states the URL that search engine crawlers shall take as "the real thing" and skip the current URL for indexing. If you read about the canonical declaration you'll see that the target URL can't just be the top-level domain of a platform - it needs to be a URL to an existing web space where the same content can be found. So that will be a specific URL for each topic that needs this kind of declaration. Obviously that is not something you can put into a master page, because it changes from topic to topic.
Content Management Systems (like WordPress) provide a feature to add that string, sometimes a SEO plug-in is needed for that (such as Yoast). That way, with each article (= topic) in the website the canonical page can be set.
The only way to implement this in RoboHelp projects that I can think of is adding this line of code in the generated output, topic by topic. Maybe that's a job for a batch command.
Copy link to clipboard
Copied
@gbr_ I'd warm up the Tracker (https://tracker.adobe.com/) to get this request on the RH team's radar. I don't think it [the ability to set a canonical URL] was ever baked in as an option for RH output because it wasn't really ever used for publishing to multiple web platforms - just one location.
Copy link to clipboard
Copied
Thanks for hinting me to the request, Jeff.
Maybe Adobe didn't realize that topic at all when starting out to Online Help that will actually be published in the world wide web (instead of being just copied onto local folders).
Each online documentation tool will inevitably run into that problem: As technical writers provide a well-crafted consistent content and relay on features for variants management, then there will be topics to slightly different products that search engine crawlers may find mostly identical and rule out as "duplicate content". There, the "canonical" attribute comes into play.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
No, it was designed for publishing up on web servers from the beginning - just that most people didn't maintain multiple versions of their content in the same location that had a lot of duplication. I know I certainly don't - with like 5000 topics, the current version is hard enough to maintain as a solo writer. 🤣