Strict Standards: Non-static method Protector::getInstance() should not be called statically in /home/suehirogari/suehirogari.com/xoops_trust_path/modules/protector/include/precheck_functions.php on line 12

Strict Standards: Non-static method XCube_Root::getSingleton() should not be called statically in /home/suehirogari/suehirogari.com/public_html/include/common.php on line 18

Deprecated: Non-static method XCube_Root::getSingleton() should not be called statically, assuming $this from incompatible context in /home/suehirogari/suehirogari.com/public_html/modules/user/preload/Primary/Primary.class.php on line 13
URLの最後「/」に対するgoogleの公式見解 | 社内SEのウェブ制作

2012.08.15seo対策

URLの最後「/」に対するgoogleの公式見解

 URLの「/」に対するgoogleの公式見解

トップページのURLを「http://www.sample.com」とするのか、「http://www.sample.com/」とするべきなのか、googleから公式の見解が出てます。
 

答えは「どちらでもよい」である。※ただし、トップページは以下のディレクトリは末尾に「/」が必要です。

http://googlewebmastercentral-ja.blogspot.jp/2010/11/url.html

ただし、検索エンジンからの評価を分散させないためも、URLの統一(URLの正規化)が必要です。

wwwは付けるべきかどうか

この答も「どちらでもよい」である。ただし、上と同じ理由で、URLの正規化の作業が必要です。

URLの正規化の方法

.htaccessが利用できるサーバーであれば、301リダイレクトを利用して、優先URLへリダイレクトさせて、どちらのURLでアクセスされても、優先URLに飛ばすことが可能です。

 

「www」有りで統一する場合

RewriteCond %{HTTP_HOST} ^(○○\.com)(:80)? [NC]
RewriteRule ^(.*)$ http://www.○○.com/$1 [R=301,L]

「www」無しに統一する場合はこちら

RewriteCond %{HTTP_HOST} ^(www\.○○\.com)(:80)? [NC]
RewriteRule ^(.*)$ http://○○.com/$1 [R=301,L]

 

 


このカテゴリの人気記事



  • コメント (0)
  • トラックバック (0)
  • 閲覧 (8437)

トラックバック

トラックバックpingアドレス http://www.suehirogari.com/modules/blog/tb.php/576

コメントの投稿

コメント投稿に関するルール : コメントは全て承認が必要

キーワードでサイト内を検索
人気のエントリ