重複しているページの URL の正規化と正規タグの利用
単一のページに複数の URL でアクセスできる場合や、異なるページのコンテンツが類似している場合(たとえば、あるページにモバイル版と PC 版両方のURLがある場合)、Google はそのようなページを同じページの重複版と見なします。Google は、こうした URL のうちの 1 つを「正規」版として選択してクロールします。その他の URL はすべて「重複」した URL と見なし、クロールの頻度を減らします。
どの URL が正規版かを Google に明示的に伝えなかった場合、Google によって正規 URL が選択されるか、またはいずれの URL も同等の重要性を持つと見なされます。その結果、「正規 URL を選択すべき理由」で示しているような望ましくない動作が発生することがあります。
このドキュメントでは、Google 検索で URL 正規化がどのように機能するか、正規 URL を指定する必要がある場合、および Google に正規ページの選択に関する希望を伝える方法について説明します。
正規 URL とは
正規 URL とは、サイトの重複するページの中で Google が最も代表的と考えるページの URL です。たとえば、同じページに複数の URL(example.com?dress=1234
と example.com/dresses/1234
)がある場合、Google はそのうちの一つを正規 URL として選択します。
重複ページは完全に同一である必要はありません。たとえば、商品のリストを表示するページで並べ替えやフィルタリング(価格による並べ替えやアイテムの色によるフィルタリングなど)がわずかに違っているだけでは、別のページとは見なされません。正規 URL は、重複 URL とは別のドメインに存在する場合があります。
Google がインデックス登録で正規 URL を選択する方法
Google は、サイトをインデックスに登録する際に、各ページの主要なコンテンツを特定しようと試みます。同一のサイト内に、同じものを扱っていると思われるページが複数見つかった場合、Google では、最も完成度が高く有用であると判断したページを選び、そのページを正規版と見なします。正規ページは最も高い頻度で定期的にクロールされます。重複ページについては、Google がサイトをクロールする負荷を軽減するため、正規ページより低い頻度でクロールされます。
Google は、いくつかの要因(シグナル)に基づいて正規ページを選択します。シグナルには、ページが HTTP と HTTPS のどちらで配信されているか、ページの品質が高いか、サイトマップに該当 URL が存在するか、rel=canonical
ラベルが付けられているかなどがあります。こうした手法を使って正規ページの選択に関する希望を Google に伝えることは可能ですが、さまざまな理由から Google が別のページを正規版として選択する場合もあります。
あるページの異なる言語のバージョンは、メイン コンテンツが元の言語と同じである場合(つまり、ヘッダーやフッターなどの重要でないテキストのみが翻訳されていて、本文が翻訳されていない場合)にのみ、重複していると見なされます。
正規ページは、Google がコンテンツと品質を評価するための主要なソースとして使用されます。Google 検索では、通常は正規ページが結果に表示されます。ただし、重複ページの中に、明らかにユーザーのニーズにより適しているものがある場合は別です。たとえば、ユーザーがモバイル デバイスで検索した場合は、PC 向けのページが正規版としてマークされていても、モバイル向けのページが検索結果に表示される可能性が高くなります。
類似ページまたは重複ページを保持する理由
サイトにおいて、同一のページを指す複数の URL を保持することや、重複したページまたは非常によく似たページを異なる URL で保持することには、いくつかの妥当な理由があります。最も一般的な理由を以下に示します。
- さまざまな種類のデバイスに対応するため:
https://example.com/news/koala-rampage https://m.example.com/news/koala-rampage https://amp.example.com/news/koala-rampage
- 並べ替えまたはフィルタに関するパラメータやセッション ID などで動的 URL を有効にするため:
https://www.example.com/products?category=dresses&color=green https://example.com/dresses/cocktail?gclid=ABCD https://www.example.com/dresses/green/greendress.html
- ブログの複数のカテゴリに同じ記事を配置したため、ブログシステムにより複数の URL が自動的に保存された:
https://blog.example.com/dresses/green-dresses-are-awesome/ https://blog.example.com/green-things/green-dresses-are-awesome/
-
www あり / www なし / http / https とプロトコル ポートの各バージョンで同じコンテンツを配信するようにサーバーが構成されている:
https://example.com/green-dresses https://example.com/green-dresses https://www.example.com/green-dresses https://example.com:80/green-dresses https://example.com:443/green-dresses
- ブログで他のサイトへのシンジケーション用に提供したコンテンツの一部またはすべてが他のサイトのドメインで複製された:
https://news.example.com/green-dresses-for-every-day-155672.html
(シンジケートされた投稿)https://blog.example.com/dresses/green-dresses-are-awesome/3245/
(元の投稿)
正規 URL を選択すべき理由
以下の理由から、重複ページまたは類似ページの中から明示的に正規ページを選択することをおすすめします。
-
検索結果でユーザーに表示したい URL を指定するため。たとえば、ユーザーを緑のワンピースの商品ページにアクセスさせる際の URL として、
https://example.com/dresses/cocktail?gclid=ABCD
ではなくhttps://www.example.com/dresses/green/greendress.html
を選ぶことができます。 -
類似ページや重複ページについてリンクのシグナルを統合するため。これにより、検索エンジンで、個々の URL について得られた情報(その URL へのリンクなど)を、選んだ 1 つの URL に統合できるようになります。つまり、他のサイトから
https://example.com/dresses/cocktail?gclid=ABCD
へのリンクが、https://www.example.com/dresses/green/greendress.html
へのリンクに統合されます。 - 単一の商品またはトピックのトラッキング指標を単純化するため。URL が複数あると、特定のコンテンツについて指標を統合することが難しくなります。
- シンジケーション コンテンツを管理するため。他のドメインで公開するコンテンツをシンジケートする場合、使用する URL が検索結果に表示されるようにする必要があります。
- 重複ページのクロールに要する時間を削減するため。Googlebot がサイトのポテンシャルを最大限に引き出すには、サイト内の同一ページの PC 版とモバイル版のクロールよりも、新しい(または更新された)ページのクロールに時間をかけるほうが効率的です。
Google が正規と見なすページを確認する
URL 検査ツールを使用して、Google でどのページが正規と見なされるかを調べます。正規ページを明示的に指定しても、パフォーマンスやコンテンツなどのさまざまな理由から、Google によって別のページが正規版として選択されることがあります。
正規ページを指定する
重複ページまたは類似ページに対応する正規 URL を指定するには、以下の方法のいずれかを使用します。以下の方法のいずれかを使用することをおすすめしますが、どれも必須ではありません。正規 URL を指定しなかった場合は、Google が最適であると判断したバージョンの URL が正規 URL として選択されます。必ず一般的なガイドラインに準拠してください。
正規化の方法と説明 | |||
---|---|---|---|
rel=canonical <link> タグ |
すべての重複ページのコードに、正規ページを指す
|
||
rel=canonical HTTP ヘッダー |
ページのレスポンスで
|
||
サイトマップ |
サイトマップで正規ページを指定します。
|
||
301 リダイレクト |
301 リダイレクトを使って、指定した URL よりもリダイレクト先の URL のほうが優れたバージョンであることを Googlebot に伝えます。この方法は、重複ページを廃止するときにのみ使用します。 |
||
ページの AMP バージョン | ページのバージョンの 1 つが AMP ページである場合は、AMP ガイドラインに沿って正規ページと AMP バージョンを指定します。 |
一般的なガイドライン
すべての正規化方法で、下記の一般的なガイドラインを遵守してください。
- 正規化の目的で robots.txt ファイルを使用しないでください。
- 正規化の目的で URL 削除ツールを使用しないでください。URL 削除ツールでは、URL のすべてのバージョンが検索で非表示になります。
- 同じ正規化方法を使用するか異なる正規化方法を使用するかにかかわらず、複数の異なる URL に対して、同じページの正規版として指定しないでください(たとえば、ある URL をサイトマップで指定した場合、同じページの別の URL を
rel="canonical"
で指定しないでください)。 - 正規ページの選択を妨げる手段として
noindex
を使用しないでください。このルールの目的はインデックスからページを除外することであり、正規ページの選択を管理することではありません。 -
hreflang タグを使用する場合は、正規ページを指定してください。正規ページは同じ言語で指定してください。同じ言語の正規ページが存在しない場合は、できる限り最適な代替言語で指定してください。
-
サイト内でリンクする場合は、重複 URL ではなく正規 URL にリンクしてください。ご自分が正規版と見なしている URL に一貫してリンクすることで、正規版の選択に関する希望が Google に理解されやすくなります。
正規 URL では HTTP より HTTPS を優先して使用する
Google は、正規 URL の選択に際して、HTTP ページより同内容の HTTPS ページを優先します。ただし、以下のように問題がある場合やシグナルが競合する場合は別です。
- HTTPS ページに無効な SSL 証明書が含まれている。
- HTTPS ページに安全でない依存関係が含まれている(画像以外)。
- HTTPS ページで、ユーザーを HTTP ページに(または HTTP ページ経由で)リダイレクトしている。
- HTTPS ページに HTTP ページへの
rel="canonical"
link
が含まれている。
Google のシステムは、デフォルトで HTTP ページより HTTPS ページを優先的に選択しますが、次のいずれかの措置を講じると、この選択が確実に行われるようにすることができます。
- HTTP ページから HTTPS ページへのリダイレクトを追加する。
- HTTP ページから HTTPS ページへの
rel="canonical"
link
を追加する。 - HSTS を実装する。
Google が HTTP ページを誤って正規版と見なすのを防ぐには、以下の行為を避けてください。
- 不適切な TLS / SSL 証明書、または HTTPS から HTTP へのリダイレクトを使用しないでください。これらは Google が HTTP を強力に優先する原因になります。この強力な優先は、HSTS を実装してもオーバーライドできません。
- サイトマップまたは hreflang エントリに、HTTPS バージョンではなく HTTP ページを含めないでください。
- SSL / TLS 証明書を、ホストの誤ったバージョンで実装しないでください(たとえば、www.example.com の証明書を example.com で配信しないでください)。証明書はサイト URL と完全に一致するか、ドメイン内の複数のサブドメインで使用できるワイルドカード証明書でなければなりません。
rel="canonical"
link
タグを使用する
rel="canonical"
link tag (canonical tag) is a tag used in the head section of HTML to
indicate that a page overlaps another page. To indicate when a page is a duplicate of another page,
you can use a
<link>
tag in the head
section of your HTML.
Suppose you want https://example.com/dresses/green-dresses
to be the
canonical URL, even though a variety of URLs can access this content. Indicate this URL as
canonical with these steps:
-
Mark all duplicate pages with a
rel="canonical"
link tag.
Add a <link
>
element with the attribute
rel="canonical"
to the <head>
section of duplicate pages, pointing to the canonical page. For example:
<link rel="canonical" href="https://example.com/dresses/green-dresses" />
-
If the canonical page has a mobile variant, add a
rel="alternate"
link
to it, pointing to the mobile version of the page:
<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.example.com/dresses/green-dresses">
-
Add any hreflang or other redirects that are appropriate for the page.
Use absolute paths rather than relative paths with the rel="canonical"
link
tag.
Good example:
https://www.example.com/dresses/green/greendress.html
Bad example:
/dresses/green/greendress.html
If you use JavaScript to add the rel="canonical"
link tag, make sure to inject the canonical link tag properly.
Use a rel="canonical"
HTTP header
If you can configure your server, you can use a rel="canonical"
HTTP header
(rather than an HTML tag) to indicate the canonical URL for a document supported by Search,
including non-HTML documents such as PDF files.
Google currently supports this method for web search results only.
If you expose a PDF file through multiple URLs, you can return a rel="canonical"
HTTP header to tell Googlebot what is the canonical URL for the PDF file:
Link: <https://www.example.com/downloads/white-paper.pdf>; rel="canonical"
The recommendations for the rel="canonical"
HTTP header are the same as
rel="canonical"
link
tag. As per
RFC2616, use only
double quotes in the rel="canonical"
HTTP header.
Use a sitemap
Pick a canonical URL for each of your pages and submit them in a
sitemap. All pages listed in a sitemap
are suggested as canonicals; Google will decide which pages (if any) pages are duplicates,
based on similarity of content.
We don't guarantee that we'll consider the sitemap URLs to be canonical, but it is a
simple way of defining canonicals for a large site, and sitemaps are a useful way to tell
Google which pages you consider most important on your site.
Don't include non-canonical pages in a sitemap. If you're using a sitemap,
specify only canonical URLs in the sitemap.
Use 301
redirects for retired URLs
Use this method when you want to get rid of existing duplicate pages, but need to ensure a
smooth transition before you retire the old URLs.
Suppose your page can be reached in multiple ways:
https://example.com/home
https://home.example.com
https://www.example.com
Pick one of those URLs as your canonical URL, and use 301
redirects to send traffic from the
other URLs to your preferred URL. A server-side 301
redirect is the best way to ensure that
users and search engines are directed to the correct page. The 301
status code means that a
page has permanently moved to a new location.
If you are on a website hosting service, do a search for their documentation on setting up
301
redirects.
Troubleshooting
If a canonical URL is in a property that you don't own, you won't be able to see any of the
traffic for your duplicate page. Here are some common reasons that a canonical can exist in a
separate property:
- Incorrectly marked language variants: If you have multiple websites that
serve substantially the same content localized to different users around the world, be sure
to follow our guidelines for
localized sites.
- Incorrect canonical tags: Some content management systems (CMS) or CMS
plugins can make incorrect use of canonicalization techniques to point to URLs on external
websites. Check your content to see if this is the case. If your site is indicating an
unexpected canonical URL preference, perhaps through incorrect use of
rel="canonical"
or a 301
redirect, fix that issue directly.
- Misconfigured servers: Some hosting misconfigurations may cause unexpected
cross-domain URL selection. For example:
- A server may be misconfigured to return content from a.com in response to a request
for a URL on b.com
- Two unrelated web servers may return identical
soft 404
pages that Google
fails to identify as error pages.
- Malicious hacking: Some attacks on websites introduce code that returns
an HTTP 301 redirect or inserts
a cross-domain
rel="canonical"
link tag into the HTML
<head>
or HTTP header, usually pointing to a URL hosting
malicious or spammy content. In these cases our algorithms may select the malicious or
spammy URL instead of the URL on the compromised website.
- A copycat website: In rare situations, our algorithm may select a URL
from an external site that is hosting your content without your permission. If you believe
that another site is duplicating your content in violation of copyright law, you may contact
the site's host to request removal. In addition, you can request that Google remove the
infringing page from our search results by filing
a request under the Digital Millennium Copyright Act.