dokuwikiが検索エンジンに載りにくい理由

Wiki, DokuWiki

08:23:20, by dozo Email , 209 words, 3743 views   Japanese (JP) del.icio.us

今まで全く気が付かなかった。

(ノ・・)ン。。。。。。(((●コロコロッ

dokuwikiを使っていて何となく思っていたことがある。

なんか検索エンジンに掲載されないなぁ。


私はブログを頻繁に書くので、
記事を書いてから検索エンジンに載るまでどのくらいか感覚的に解っている。
しかし、あくまで感覚値なため、
ものによってはそう言うこともあるんだろうなと特別調べもしなかった。


とある日、
cache-controlを制御しようと、
メタ情報追加作業をしている時のこと。
headタグを眺めていると、

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pythonコンポーネント [dozo dokuwiki.py]</title>
<meta http-equiv="Cache-Control" content="no-cache" />
<meta name="generator" content="DokuWiki Release 2007-06-26b" />
<meta name="robots" content="noindex,nofollow" />
<meta name="date" content="2007-10-30T21:56:04+0900" />
<meta name="keywords" content="start" />


(つд⊂)ゴシゴシ

( -_-) ジー

<meta name="generator" content="DokuWiki Release 2007-06-26b" />
<meta name="robots" content="noindex,nofollow" />
<meta name="date" content="2007-10-30T21:56:04+0900" />



・・・(゜Д゜)


待て!
なんだこれ!


ということで急遽調査開始。
結論から言うと
  • サイト設定の[スパム対策]-[インデックスを許可(何秒後)]の数値を調整

が必ず必要のようだ。
っていうか0秒でいいよ。

[More:]



慌ててテンプレートを調べると、
<?php tpl_metaheaders(); ?>


(´・ω・)ブラックボックスカヨ


システムジェネレータがメタタグをはき出している。
逆に言えば何やってるのか解らない。
dokuwikiのソース(執筆時:ver.2007-06-26b)を落とし、
noindexでファイル検索してみる。
template.phpにこんな記述があった。
// setup robot tags apropriate for different modes
if( ($ACT=='show' || $ACT=='export_xhtml') && !$REV){
if($INFO['exists']){
//delay indexing:
if((time() - $INFO['lastmod']) >= $conf['indexdelay']){
$head['meta'][] = array( 'name'=>'robots', 'content'=>'index,follow');
}else{
$head['meta'][] = array( 'name'=>'robots', 'content'=>'noindex,nofollow');
}
}else{
$head['meta'][] = array( 'name'=>'robots', 'content'=>'noindex,follow');
}
}elseif(defined('DOKU_MEDIADETAIL')){
$head['meta'][] = array( 'name'=>'robots', 'content'=>'index,follow');
}else{
$head['meta'][] = array( 'name'=>'robots', 'content'=>'noindex,nofollow');
}
switch使ってくれ。という願いは置いておき、
なにやら複雑なことをしている。
問題になりそうなのはこれ。
if((time() - $INFO['lastmod']) >= $conf['indexdelay'])

lastmodってのは恐らく最終更新時間。
そこからindexdelayというパラメータと比較して、
なにやらやっているらしい。


confってことは設定ファイルだ。
管理画面から設定一覧画面を出しそのソースから設定場所を特定してみると、
インデックスを許可(何秒後) 60*60*24*5


( ̄-  ̄ ) エット・・・5日後?



つまりページを作って5日間全く更新されない状態で初めてインデックスが許可されると言うことだ。
しかも最終更新時間というのはページ単位ではなく、
wiki全体のことを意味している。
なので、一つでもページを変更すれば全ページが5日間検索エンジンにクロールされないことになる。

いやいや、どこまで完璧主義なんですか。


スパム対策の一環と言うことになっているが、
ゲスト書き換えも登録も出来ないようにしている私のwikiには全く不要だ。



設定値を0にして保存!


Trackback address for this post:

http://hain.jp/htsrv/trackback.php/191

Comments, Trackbacks:

No Comments/Trackbacks for this post yet...

Leave a comment:

Your email address will not be displayed on this site.
Your URL will be displayed.

Allowed XHTML tags: <p, ul, ol, li, dl, dt, dd, address, blockquote, ins, del, span, bdo, br, em, strong, dfn, code, samp, kdb, var, cite, abbr, acronym, q, sub, sup, tt, i, b, big, small>
(Line breaks become <br />)
(Set cookies for name, email and url)
(Allow users to contact you through a message form (your email will NOT be displayed.))
This is a captcha-picture. It is used to prevent mass-access by robots.

Please enter the characters from the image above. (case insensitive)

powered by b2evolution

shinobi

Neighbors
Relative
Favorites
PR

極論istの技術屋を始めて早幾年。 流れの速い業界の波にもまれながらも精一杯生きている様をとくとごらんあれ。

Archives
スポンサー

Latest bookmark
Search

Categories

Who's Online?
Misc
Syndicate this blog XML

Valid XHTML 1.0! Valid CSS! Valid RSS 2.0! Valid Atom 1.0!