Canonical Tag

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
securitypro
Jr. Propeller Head
Posts: 5
Joined: Wed Nov 16, 2016 8:51 am

Canonical Tag

Post by securitypro »

I inputted a Canonical HTML tag within the <header> tag of each page's HTML

For example:

<link rel="canonical" href="https://docs.domain.com/Content/introdu ... b-site.htm" />


When I build the online output/web help, the Canonical tag does not appear in the generated output.

I also manually inputted HTML metadescriptions using the Topic Properties. Those appear but I also get an empty metadescription tag, in addition to the meta description that I typed in.

Is there a way to add canonical tags to Flare web output?

This is for v11.1.12
securitypro
Jr. Propeller Head
Posts: 5
Joined: Wed Nov 16, 2016 8:51 am

Re: Canonical Tag

Post by securitypro »

Anyone have an answer?

Does Flare offer Canonical support? When I handcoded Canonical tags into the output, they weren't published to the web.
Nita Beck
Senior Propellus Maximus
Posts: 3672
Joined: Thu Feb 02, 2006 9:57 am
Location: Pittsford, NY

Re: Canonical Tag

Post by Nita Beck »

Hi securitypro...

Speaking only for myself, I've never even heard of canonical tags until reading your "bump" today. You might end up having to contact MadCap directly, given that it seems like the Flare users who hang around the forums don't have an answer for you.

Sorry I couldn't be of help. Maybe your "bump" will get the attention of someone who knows more than I.
Nita
Image
RETIRED, but still fond of all the Flare friends I've made. See you around now and then!
GregStenhouse
Sr. Propeller Head
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: Canonical Tag

Post by GregStenhouse »

Were you adding the <link rel... tag to the masterpage or individual topics? I can understand topics stripping out the code, but I would hope the masterpage would copy the code across as is.

The other thing to try would be adding some JavaScript to the HTML5 skin (under the Toolbar accordion | Custom JavaScript to include in Toolbar box):

Code: Select all

$(document).ready(function(){
	$("head").append("<link rel=\"canonical\" href=\"https://docs.domain.com/Content/introducing-company/global-web-site.htm\" />");	
});
securitypro
Jr. Propeller Head
Posts: 5
Joined: Wed Nov 16, 2016 8:51 am

Re: Canonical Tag

Post by securitypro »

GregStenhouse wrote:Were you adding the <link rel... tag to the masterpage or individual topics? I can understand topics stripping out the code, but I would hope the masterpage would copy the code across as is.
I was adding to individual topics which got stripped out. Sounds like a good idea to try. How do you add to the masterpage (and make sure that each individual topic gets a unique URL.
lennie
Jr. Propeller Head
Posts: 4
Joined: Sat Jul 15, 2017 3:03 am

Re: Canonical Tag

Post by lennie »

Hi all,

I'm new to the forum but have been working on a really nice MadCap Flare integration for the past year.
I have a technical SEO background and from an SEO standpoint, this canonical tag is very important.

I would like to bump this question, because the proposed solution with javascript is not good enough. A lot of parsers don't instantiate javascript (for example the crawler from MOZ.com).
So our KB gives us a lot of errors about duplicate content. This comes mainly because after a search there is an ?Highlight=... added to the URL. The original URL and the ?Highlight one are seen as different pages.

With a set canonical tag pointing to the original URL of that page without parameters in the <head> we could get rid of these errors.

Now, my question is:

Is there a way to get the current URL without parameters (as a page variable) as a MadCap Flare setting so I can add it myself to the <head> setting without Javascript?
If not...can you put this on the roadmap?

Thx
lennie
Jr. Propeller Head
Posts: 4
Joined: Sat Jul 15, 2017 3:03 am

Re: Canonical Tag

Post by lennie »

I figured out a workaround and wrote an article about it on LinkedIn, so you too can have canonical links in your topic pages until MadCap integrates it in Flare.
https://www.linkedin.com/pulse/solution ... e-wesdijk-
GregStenhouse
Sr. Propeller Head
Posts: 330
Joined: Tue May 13, 2008 3:27 pm
Location: Christchurch, New Zealand

Re: Canonical Tag

Post by GregStenhouse »

Nice solution. An alternative to search on replace via SSH on the server is to run a post build command in Flare that calls a Powershell script that does the search and replace. This means it will happen automatically on build, and is available to check locally before upload.
Post Reply