Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Klemens Dickbauer
Removing languages - really, totally
August 12, 2012 4:17 AM
Answer

Klemens Dickbauer

Rank: New Member

Posts: 24

Join Date: February 4, 2012

Recent Posts

Hi,

when I first had my personal liferay up and running google found it and started to crawl it thoroughly. Then I had the languages selection kept set to default, having links to all the languages in the reachable login portlet.
Later I narrowed languages in <./tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties > to "locales=en_US,en_GB,de_DE,sl_SI,de_AT". But well, google seems to be kind of stubborn and keeps crawling the site with all the langauges (like "GET /fr/web/[..]"). Liferay returns then sometimes a 200, sometimes a 302, googles is happy with that and keeps track of all languages in its index, leading people who stumble upon my site by chance in google to differen "languages".
I already tried to remove the not supported languages with google webmaster tools, but that does not seem to work reliably.

Is there a way that liferay returns a 404 when a not support language is used in the URL? Or did I misunderstand the underlying concept?

thanks,
klemens
Hitoshi Ozawa
RE: Removing languages - really, totally
August 12, 2012 2:20 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

I haven't tried this but have you tried removing the language code from the url?

Set the following in portal-ext.properties:
locale.prepend.friendly.url.style=0
Klemens Dickbauer
RE: Removing languages - really, totally
August 26, 2012 4:59 AM
Answer

Klemens Dickbauer

Rank: New Member

Posts: 24

Join Date: February 4, 2012

Recent Posts

Ahoj Hitoshi,

thanks for your help emoticon
After some doubts about that I break some possible external links I tried that out. But still Liferay happily serves URLs including the country code. But not much harm is done - I hope the google indexer will some day realize that those links are not referenced by any that and decrease their ranking till they die of some kind.

thanks again,
~klemens
Hitoshi Ozawa
RE: Removing languages - really, totally
August 26, 2012 4:39 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Another possible option may be to set robot.txt and disallow unused language url from being crawled.
Klemens Dickbauer
RE: Removing languages - really, totally
August 26, 2012 5:03 PM
Answer

Klemens Dickbauer

Rank: New Member

Posts: 24

Join Date: February 4, 2012

Recent Posts

Hitoshi Ozawa:
Another possible option may be to set robot.txt and disallow unused language url from being crawled.


Funny... that's what I did just this moment. You should start a metaphysical support center corporation. ;)
Thanks for the tipp!