構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Liron Levi
Canonical tags configuration
2012/07/16 1:48
答え

Liron Levi

ランク: New Member

投稿: 3

参加年月日: 2012/03/12

最近の投稿

Hi Guys,

I notice that in 6.1 Liferay have included automatic canonical tag support which is great.
I was wondering if there is a way to configure these links for specific pages manually, it will be very helpful from SEO aspects.

Thanks,
Liron Levy
Sergio Sánchez
RE: Canonical tags configuration
2012/07/17 2:37
答え

Sergio Sánchez

LIFERAY STAFF

ランク: Junior Member

投稿: 65

参加年月日: 2011/07/06

最近の投稿

Hi Liron. Yes, the canonical tag is generated for Liferay's URLs to prevent some duplicates for cases like:
- the root page for a community
- sites that have a virtual host defined
- uselesss parameters for indexing purposes like the redirect parameter.

the canonical tag is automatically generated.
The alternate tag for all the translations can also be generate, in this case if it is selected in the SEO section for the page.

Would it be helpful for you to have the ability to select when to include or not the canonical tag?
Liron Levi
RE: Canonical tags configuration
2012/07/24 8:41
答え

Liron Levi

ランク: New Member

投稿: 3

参加年月日: 2012/03/12

最近の投稿

Hi Sergio,
well it will be definitely beneficial for us to control this ability and additionally have the ability to manually configure the link for every page.
from SEO aspect that are situation in which we need this ability for example we might want to add a canonical link to http:\\sitename.com from some internal page.

Thanks,
Liron
Marina Ra
RE: Canonical tags configuration
2012/07/30 3:21
答え

Marina Ra

ランク: Junior Member

投稿: 56

参加年月日: 2012/07/12

最近の投稿

is there a way to create canonical links/tags for single knowledge base articles or wiki pages as well?? i´m having big troubles with that :-/
Peter Kowski
RE: Canonical tags configuration
2012/08/01 3:09
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

Liron Levi:
Hi Guys,
..wondering if there is a way to configure these links for specific pages manually, it will be very helpful from SEO aspects.

I too have been trying to figure out a solution for this same issue, but am not really getting anywhere with my investigations as I am not finding much in documentation or in the forums.

What I am trying to achieve is to make sure that canonical tags are inserted in locations that are displaying some web content in the situuations where the same web content is also available directly elsewhere. I am referring to the case where the web content has already previosly been associated with a page using the functionality described by Jorge in "More flexible linking of web content to full page in Asset Publisher".
In these cases, I would assume that the canonical tag needs to point back to the special URL of the original web content as described by:
Jorge Ferrer:

Whenever the full view of the web content is shown in any other page of the portal, it will automatically add <meta> tags in the page to let search engines know about the canonical URL of the content.

But I can't seem to get this to work. My canonical tags always just point back to the same page that I am on, or at best they point back to the original content if I am viewing the content in a different language locale.

Has anyone else had progress on this front?
Peter Kowski
RE: Canonical tags configuration
2012/09/03 2:33
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

Doesn't anybody have any leads on this? I just upgraded to 6.1 GA2 and the behaviour of the canonical tags seem to be even more erratic.

I will try and demonstrate my issues with the following simple example.
  1. Let's say I have a sports news website that has a page displaying a news story about Rafa Nadal winning a grand slam. The friendly URL of the page is:
    www.superportal.com/web/sports/nadal_victory
    This page contains nothing more than a single web content display diplaying a web content called "rafa-nadal-wins-grand-slam".
  2. I also have the same Web Content associated with another display page that contains a pre-configured AP. The display page has the following URL:
    www.superportal.com/web/sports/tennis_news_publisher
  3. Due to the "display page" configuration in step 2, the original web content can also be called directly via the following URL:
    www.superportal.com/web/sports/-/rafa-nadal-wins-grand-slam
    (The nice thing is that I call any other identically structured web content via the same display page by naming it after the special /-/ delimiter)

To test the canonical tags, I view the pages while not being logged in and have a look at their page sources:
Page 1: In both GA1 and GA2, the canonical URL of Page 1 is its own URL.
Page 2: I am not really interested in Page 2, as it is used just as a display page, and as such users should never really reach it.
Page 3: This page had a canonical tag that pointed to itself in GA1, and in GA2 this has now changed to point to a non-sensical and non-functional URL: www.superportal.com/web/sports/tennis_news_publisher/-/rafa-nadal-wins-grand-slam.

Another thing I have noticed with GA2 is that links in the source code do not appear as is but instead contain unicodes for slashes, ampersands, dots etc.
e.g. link href="http&#x3a;&#x2f;&#x2f;www&#x2e;mysuperportal&#x2e;com&#x3a;8080&#x2f;ar&#x2f;-&#x2f;rafa-nadal-wins-grand-slam"

Can anybody tell me if this behaviour makes any sense, or is it all just riddled with bugs? I would at least assume that page 1 should point to page 3 no?
Sergio Sánchez
RE: Canonical tags configuration
2012/08/31 5:44
答え

Sergio Sánchez

LIFERAY STAFF

ランク: Junior Member

投稿: 65

参加年月日: 2011/07/06

最近の投稿

Thank you for your tests Peter.

I'll try to find out what is happening in GA2 with the asset publisher and those unicode charcaters.

I'll let you know.
Peter Kowski
RE: Canonical tags configuration
2012/09/25 2:53
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

Sergio Sánchez:
Thank you for your tests Peter.

I'll try to find out what is happening in GA2 with the asset publisher and those unicode charcaters.

I'll let you know.

Hi Sergio. Did you manage to make any progress on finding out what is causing URL's to be generated with unicode characters? Very much looking forward to your answer!
Peter Kowski
RE: Canonical tags configuration
2012/10/04 1:55
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

Does nobody have any ideas about this bug? (If indeed it is a bug?)
Peter Kowski
RE: Canonical tags configuration
2012/10/09 2:40
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

Sorry for still trying to escalate this. I am getting quite frustrated with how buggy the CE versions appear and yet there doesn't seem to be too much activity on this forum. The gaps between GA's on the CE and the fact that fairly fundamental issues seem to go unresolved seems to suggest that an upgrade to EE is the only solution, but to be honest so far my experiments and experiences with CE doesn't really give me much confidence in the product. Sorry for the rant!

This is what appears in the source of any of my GA2 pages:
<link href="http&#x3a;&#x2f;&#x2f;localhost&#x3a;8080&#x2f;web&#x2f;sitio-pruebas-rapidas&#x2f;-&#x2f;webcontent-test-1" rel="canonical" />
<link href="http&#x3a;&#x2f;&#x2f;localhost&#x3a;8080&#x2f;en_GB&#x2f;web&#x2f;sitio-pruebas-rapidas&#x2f;-&#x2f;webcontent-test-1" hreflang="en-GB" rel="alternate" />
Sergio Sánchez
RE: Canonical tags configuration
2012/10/09 2:58
答え

Sergio Sánchez

LIFERAY STAFF

ランク: Junior Member

投稿: 65

参加年月日: 2011/07/06

最近の投稿

Hey, I couldn't reproduce it.
Do you have the encoding to UTF-8?
Peter Kowski
RE: Canonical tags configuration
2012/10/10 4:25
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

Sergio Sánchez:

Do you have the encoding to UTF-8?

Yes I do. This is what appears in the top of my source:
<!DOCTYPE html> <html class="ltr" dir="ltr" lang="es-ES"> <head> <title>Titulo</title> <meta content="text/html; charset=UTF-8" http-equiv="content-type" />

I also had a look at the source of another GA2 site (not related to me) and they have the same issue: view-source:http://lcepatchers.org/web/guest

Thanks for your help Sergio. I really am grateful!
Peter Kowski
RE: Canonical tags configuration
2012/10/29 6:29
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

No progress?
Sergio Sánchez
RE: Canonical tags configuration
2012/10/29 6:40
答え

Sergio Sánchez

LIFERAY STAFF

ランク: Junior Member

投稿: 65

参加年月日: 2011/07/06

最近の投稿

Hi, I don't see from lcepatcher any strange characters in the canonical meta tag:

<link rel="canonical" href="https://www.lcepatchers.org/home?p_p_id=58&p_p_lifecycle=0&p_p_state=maximized&p_p_mode=view&saveLastPath=0&_58_struts_action=%2Flogin%2Fcreate_account">

Browsing different pages all have the canonical OK.
Peter Kowski
RE: Canonical tags configuration
2012/10/29 7:50
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

Thanks for the quick reply Sergio. For the same page that you mentioned, it appears like this for me:
<link href="https&#x3a;&#x2f;&#x2f;www&#x2e;lcepatchers&#x2e;org&#x2f;home&#x3f;p_p_id&#x3d;58&#x26;p_p_lifecycle&#x3d;0&#x26;p_p_state&#x3d;maximized&#x26;p_p_mode&#x3d;view&#x26;saveLastPath&#x3d;0&#x26;_58_struts_action&#x3d;&#x25;2Flogin&#x25;2Fcreate_account" rel="canonical" />
I have tested this from 2 different browsers (firefox and chromium) on my local Ubuntu machine which is configured with language locale EN:GB as well as on the same 2 from a colleague's machine who has his locale en Spanish. I also tried from a windows machine in Chrome, FF and IE7 and it always looks the same.

Conclusion: There must either be something strange on our local network configuration, or something buggy in the code. (or a combination of the 2). I will check from my machine when I get home and report back here.

Thanks once again!
Peter Kowski
RE: Canonical tags configuration
2012/10/30 1:31
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

Hi Sergio,
I checked from 2 other machines outside of my office, and I get the same unicode characters. I checked both my GA2 install as well as the one that I mentioned (lcepatchers). Not sure what is happening.
Tobias Robinson
RE: Canonical tags configuration
2012/11/07 16:33
答え

Tobias Robinson

ランク: New Member

投稿: 2

参加年月日: 2012/10/25

最近の投稿

Hi guys,

I have the same problem in EE GA2. I am developing my themes in windows and deploying to liferay + mysql on a ubuntu server, would there be any encoding issues deploying like this?
Luis Mas
RE: Canonical tags configuration
2012/11/13 0:40
答え

Luis Mas

ランク: Regular Member

投稿: 146

参加年月日: 2009/05/18

最近の投稿

I'm viewing the issue with lcepatchers.org in last versions of Chrome, Firefox and Internet Explorer over Windows 8 Spanish version. Did you already open an Issue in https://issues.liferay.com?

<!DOCTYPE html> <html class="ltr" dir="ltr" lang="en-US"> <head> <title>Welcome - lcepatchers.org</title> <meta content="text/html; charset=UTF-8" http-equiv="content-type" /> <link href="https://www.lcepatchers.org/zoe-tech-theme/images/favicon.ico" rel="Shortcut Icon" /> <link href="https&#x3a;&#x2f;&#x2f;www&#x2e;lcepatchers&#x2e;org" rel="canonical" /> <link href="&#x2f;html&#x2f;css&#x2f;main&#x2e;css&#x3f;browserId&#x3d;firefox&#x26;themeId&#x3d;zoetech_WAR_zoetechtheme&#x26;minifierType&#x3d;css&#x26;languageId&#x3d;en_US&#x26;b&#x3d;6101&#x26;t&#x3d;1333360784000" rel="stylesheet" type="text/css" /> <link href="/html/portlet/journal_content/css/main.css?browserId=firefox&amp;themeId=zoetech_WAR_zoetechtheme&amp;minifierType=css&amp;languageId=en_US&amp;b=6101&amp;t=1349769179000" rel="stylesheet" type="text/css" /> <link href="/html/portlet/rss/css/main.css?browserId=firefox&amp;themeId=zoetech_WAR_zoetechtheme&amp;minifierType=css&amp;languageId=en_US&amp;b=6101&amp;t=1349769179000" rel="stylesheet" type="text/css" /> <link href="/social-networking-portlet/members/css/main.css?browserId=firefox&amp;themeId=zoetech_WAR_zoetechtheme&amp;minifierType=css&amp;languageId=en_US&amp;b=6101&amp;t=1352391060000" rel="stylesheet" type="text/css" />
...
</html>

Regards, Luis
Peter Kowski
RE: Canonical tags configuration
2012/11/13 1:29
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

Luis Mas:
I'm viewing the issue with lcepatchers.org in last versions of Chrome, Firefox and Internet Explorer over Windows 8 Spanish version. Did you already open an Issue in https://issues.liferay.com?

Thanks for the test Luis. I have opened an issue now. LPS-30994
Peter Kowski
RE: Canonical tags configuration
2012/11/13 1:31
答え

Peter Kowski

ランク: Junior Member

投稿: 26

参加年月日: 2012/08/01

最近の投稿

The problems with the unicode characters are not really that major though it does seems something is not right.

The more underlying major issue that I have is that when I display web content as a page in a preconfigured asset publisher, the exact same page can be reached in 2 ways:
1. www.example.com/page/-/asset_publisher/name-of-ap/content/name-of-web-content
2. www.example.com/-/name-of-web-content
This would all be fine if one contains a relevant Canonical tag to the other, but sadly this is not the case. By the way this also happens in GA1 as well. The SEO problem I am having is that I am promoting URL type 2, but search engines are also indexing type 1 and flagging it as multiple content. In my case, the built in taglib-social-bookmark-facebook component displays URL type 1, and that is how search engines get there.
Jörg Halitschke
RE: Canonical tags configuration
2013/03/21 7:26
答え

Jörg Halitschke

ランク: Junior Member

投稿: 36

参加年月日: 2009/02/14

最近の投稿

You can fix this in /html/common/themes/top_head.jsp

The right escape method is HtmlUtil.escape() not HtmlUtil.escapeAttribute()

Lines 56 + 73
Tobias Robinson
RE: Canonical tags configuration
2013/04/09 16:05
答え

Tobias Robinson

ランク: New Member

投稿: 2

参加年月日: 2012/10/25

最近の投稿

Jörg Halitschke:
You can fix this in /html/common/themes/top_head.jsp

The right escape method is HtmlUtil.escape() not HtmlUtil.escapeAttribute()

Lines 56 + 73



Thanks Jörg!

This worked for me, I just created a hook with the changes. I noticed now on the liferay site their encoding has the same issue:

<link href="http&#x3a;&#x2f;&#x2f;www&#x2e;liferay&#x2e;com" rel="canonical" /> <link href="http&#x3a;&#x2f;&#x2f;www&#x2e;liferay&#x2e;com&#x2f;zh" hreflang="zh-CN" rel="alternate" /> <link href="http&#x3a;&#x2f;&#x2f;www&#x2e;liferay&#x2e;com&#x2f;fr" hreflang="fr-FR" rel="alternate" /> <link href="http&#x3a;&#x2f;&#x2f;www&#x2e;liferay&#x2e;com&#x2f;de" hreflang="de-DE" rel="alternate" /> <link href="http&#x3a;&#x2f;&#x2f;www&#x2e;liferay&#x2e;com&#x2f;hu" hreflang="hu-HU" rel="alternate" /> <link href="http&#x3a;&#x2f;&#x2f;www&#x2e;liferay&#x2e;com&#x2f;it" hreflang="it-IT" rel="alternate" /> <link href="http&#x3a;&#x2f;&#x2f;www&#x2e;liferay&#x2e;com&#x2f;ja" hreflang="ja-JP" rel="alternate" /> <link href="http&#x3a;&#x2f;&#x2f;www&#x2e;liferay&#x2e;com&#x2f;pt" hreflang="pt-BR" rel="alternate" /> <link href="http&#x3a;&#x2f;&#x2f;www&#x2e;liferay&#x2e;com&#x2f;es" hreflang="es-ES" rel="alternate" /> <link href="http&#x3a;&#x2f;&#x2f;cdn&#x2e;www&#x2e;liferay&#x2e;com&#x2f;html&#x2f;css&#x2f;main&#x2e;css&#x3f;browserId&#x3d;other&#x26;themeId&#x3d;osb_WAR_osbtheme&#x26;minifierType&#x3d;css&#x26;languageId&#x3d;en_US&#x26;b&#x3d;6120&#x26;t&#x3d;1364968999000" rel="stylesheet" type="text/css" />