Status: offline


Forum User
Full Member
Registered: 11/25/04
Posts: 314
This is multi language site.

top page: <= regist search engine

Thank you for adding hreflang code.

but now I have to add this code in header.thtml:

Text Formatted Code

<?php if( COM_onFrontpage() ) { ?>
<link rel="alternate" href="{site_url}/index.php/topic/home_ja" hreflang="ja"{xhtml}>
<link rel="alternate" href="{site_url}/index.php/topic/home_en" hreflang="en"{xhtml}>
<link rel="alternate" href="{site_url}/index.php/topic/home_zh" hreflang="zh"{xhtml}>
<link rel="alternate" href="{site_url}/index.php/topic/home_ko" hreflang="ko"{xhtml}>
<link rel="alternate" href="{site_url}/" hreflang="x-default"{xhtml}>
<?php } ?>

and add hreflang="x-default" to language top page header.thtml

add this code in header.thtml:
Text Formatted Code

<?php $url_current = COM_getCurrentURL(); if( strpos( $url_current, '/index.php/topic/home_' ) !== false ) { ?>
<link rel="alternate" href="{site_url}/" hreflang="x-default"{xhtml}>
<?php } ?>

other page are all okay.

but switchlang.php have problem, I think.

click "en" switchlang/en
display staticpages plugin en data. but topic title(center area top) is ja, and url is ja, too.

reflesh url en and display en topic.

1 language content 1 url for crawler.

Geeklog Japan

Status: offline


Forum User
Registered: 04/18/19
Posts: 1
How did you optimize these websites? Any seo strategies?


how can you handle this multi-language site