robots.txt に sitemap.xml の場所を追加しよう
04/15/2007, 21:45 | Category: ヒント
Yahoo!、Google、MSN、Ask.jp などの検索エンジンが「Sitemap」プロトコルへの対応を強化するという発表がありました。
中でも画期的なのが、サイトマップの位置を知らせるのにいちいち申請などをせずとも、robots.txt ファイルに「ある表記」を追記しておけばよくなったというところです。
Specifying the Sitemap location in your robots.txt fileYou can specify the location of the Sitemap using a robots.txt file. To do this, simply add the following line:
Sitemap: <sitemap_location>
The
should be the complete URL to the Sitemap, such as: http://www.example.com/sitemap.xml This directive is independent of the user-agent line, so it doesn't matter where you place it in your file. If you have a Sitemap index file, you can include the location of just that file. You don't need to list each individual Sitemap listed in the index file.
表記の仕方ですが、robots.txt に「Sitemap: [サイトマップの位置]」と書いておくだけ。
http://www.example.com/sitemap.xml にサイトマップがある場合は、
Sitemap: http://www.example.com/sitemap.xml
となります。
今まで robots.txt を殆ど使っていなかったのですが、これは導入せざるを得なくなりましたね。









0 Comment(s)
コメントする