2017-12-23 10 views
0

私は最近、私のウェブサイトにドイツ語のサポートを追加しました。今は私のウェブサイトのドイツ語版を検索結果にドイツ語圏の訪問者に、そして英語版を他のすべての訪問者に表示したいと思います。hreflangタグで何が問題になっていますか?

デスクトップ

<link rel="canonical" href="https://example.com/"> 
<link rel="alternate" media="only screen and (max-width:651px)" href="https://m.example.com/"> 
<link rel="alternate" href="https://example.com/" hreflang="x-default"> 
<link rel="alternate" href="https://example.com/?hl=de" hreflang="de"> 

モバイル

<link rel="canonical" href="https://example.com/"> 
<link rel="alternate" href="https://m.example.com/" hreflang="x-default"> 
<link rel="alternate" href="https://m.example.com/?hl=de" hreflang="de"> 

そしてため、このhreflangタグドイツバージョン(https://example.com/?hl=de:私は私のデフォルトページ(https://example.com/)へのリンクタグを追加しました):

デスクトップ

<link rel="canonical" href="https://example.com/"> 
<link rel="alternate" media="only screen and (max-width:651px)" href="https://m.example.com/?hl=de"> 
<link rel="alternate" href="https://example.com/" hreflang="x-default"> 
<link rel="alternate" href="https://example.com/?hl=de" hreflang="de"> 

モバイル

<link rel="canonical" href="https://example.com/"> 
<link rel="alternate" href="https://m.example.com/" hreflang="x-default"> 
<link rel="alternate" href="https://m.example.com/?hl=de" hreflang="de"> 

しかし、私は問題を抱えています。 GoogleでYoutubeを検索すると、YouTubeのドイツ語版(https://www.youtube.com/?gl=DE&hl=de)のみが返されます。しかし私が私のウェブサイトを検索すると、Googleは自分のウェブサイトの英語版をデフォルトとドイツ語版をスニペットとして表示します。私のコードで何が間違っていますか?

答えて

0

canonical URLを正しく実装しました。

複数のURLからアクセスできる1つのページ、または同様のコンテンツを持つ別のページ(モバイル版とデスクトップ版の両方のページなど)がある場合は、Googleに正式なURL(正式)を作成します。

あなたはデスクトップモバイル、および二つの言語英語ドイツのためのさまざまなサイトを持っています。彼らは異なった内容を提供しています、あなたは準拠URLを対応して更新するべきです。

デスクトップ

<link rel="canonical" href="https://example.com/"> 

モバイル

<link rel="canonical" href="https://m.example.com/"> 

デスクトップドイツ語

<link rel="canonical" href="https://example.com/?hl=de"> 

モバイルドイツ

<link rel="canonical" href="https://m.example.com/?hl=de"> 
0

Google recommendations Duplicate contentによると:

使用トップレベルドメイン:、私たちは文書の最も適切なバージョンを果たす手助けできる限りトップレベルドメインを使用するには国固有のコンテンツを処理します。 http://www.example.deには、たとえばドイツ語のコンテンツが含まれています(たとえば、http://www.example.com/deまたはhttp://de.example.com)。

Google recommendations Separate URLsによると:<link rel="alternate" media="only screen and (max-width: 640px)" href="http://m.example.com/page-1">をモバイルページ(http://m.example.com/page-1)上で、必要な注釈は次のようになります:デスクトップのページ(http://www.example.com/page-1)で

、追加<link rel="canonical" href="http://www.example.com/page-1">

Desktipsからこのメタリンクを削除する必要があります <link rel="canonical" href="https://example.com/">

関連する問題