現在位置: Top/Googleサイトマップ

*Googleサイトマップ
#ref(logo_wht_60.gif,nolink)
Googleサイトマップ
https://www.google.com/webmasters/sitemaps/login
**MovableType
http://www.total-web.jp/technical/000064.php
+テンプレートの編集をします。
テンプレートの名前:GoogleSitemaps
出力ファイル名:sitemap.xml
インデックス・テンプレートを再構築するときにこのテンプレートを自動的に再構築する:チェックする
テンプレートの中身:
 <?xml version="1.0" encoding="UTF-8"?>
 <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 <url>
 <loc><$MTBlogURL encode_xml="1"$></loc>
 <priority>1.0</priority>
 </url>
 <MTCategories>
 <url>
 <loc><$MTCategoryArchiveLink encode_xml="1"$></loc>
 </url>
 </MTCategories>
 <MTEntries lastn="9999">
 <url>
 <loc><$MTEntryPermalink encode_xml="1"$></loc>
 <lastmod><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></lastmod>
 </url>
 </MTEntries>
 </urlset>
+再構築する。
+<URL>sitemap.xmlを登録

**Nucleus
http://blog.cles.jp/item/889
+sitemap.php
 <?php
 $CONF = array();
 include('./config.php');
 selectSkin('google/sitemap');
 selector();
 ?>
+skinbackup.xml
 <nucleusskin>
 <meta>
 <skin name="google/sitemap" />
 <template name="google/sitemap" />
 <info><![CDATA[Google Sitemaps Skin]]></info>
 </meta>
 <skin name="google/sitemap" type="text/xml" includeMode="normal" includePrefix="">
 <description>GoogleSitemap</description>
 <part name="index"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
 <urlset
  xmlns="http://www.google.com/schemas/sitemap/0.84"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
    http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 <url>
 <loc><%sitevar(url)%></loc>
 <priority>1.0</priority>
 </url>
 <%blog(google/sitemap,9999)%>
 </urlset>]]></part>
 </skin>
 <template name="google/sitemap">
 <description>GoogleSitemap</description>
 <part name="FORMAT_DATE"><![CDATA[%Y-%m-%d]]></part>
 <part name="FORMAT_TIME"><![CDATA[%H:%M:%S]]></part>
 <part name="ITEM"><![CDATA[<url>
 <loc><%blogurl%><%itemlink%></loc>
 <lastmod><%date(utc)%></lastmod>
 </url>
 ]]></part>
 </template>
 </nucleusskin>
+sitemap.phpはindex.phpと同じフォルダへ。
+skinbackup.xmlはskins/sitemapフォルダへ。
+管理画面から「レイアウト設定」の「読込/書出」で「ローカルファイルから読み込み:」の「sitemap」を選択して「読み込み」
+<URL>sitemap.phpを登録

**Pukiwiki
http://terai.xrea.jp/PukiWiki/Google.html
+sitemaps.inc.php
 <?php
 function plugin_sitemaps_action() {
   $sitemaps_max = 1000;
   $recent = CACHE_DIR . 'recent.dat';
   if (! file_exists($recent)) die('recent.dat is not found');
     $self = get_script_uri();
     $items = '';
     foreach (array_splice(file($recent), 0, $sitemaps_max) as $line) {
       $r_page = rawurlencode($page);
       list($time, $page) = explode("?t", rtrim($line));
       $time = $time + 9*3600;
       $date = substr_replace(gmdate('Y-m-d?TH:i:sO', $time),':',-2,0);
       //$date = get_date('Y-m-d', $time);
       $items .= <<<EOD
 <url>
  <loc>$self?$r_page</loc>
  <lastmod>$date</lastmod>
  <priority>1.0</priority>
 </url>
 
 EOD;
   }
   pkwk_common_headers();
   header('Content-type: application/xml');
   print '<?xml version="1.0" encoding="UTF-8"?>' . "?n?n";
     print <<<EOD
 <urlset
  xmlns="http://www.google.com/schemas/sitemap/0.84"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
    http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
 $items
 </urlset>
 EOD;
   exit;
 }
 ?>
+pluginフォルダに
+<URL>?cmd=sitemapsを登録

**Sitemap Index
一つのドメインに複数のサイトマップがあるときは、Sitemap Indexをルートにおく
sitemap_index.xml
 <?xml version="1.0" encoding="UTF-8"?>
 <sitemapindex xmlns="http://www.google.com/schemas/sitemap/0.84">
 <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <sitemap>
       <loc>http://www.hkd.cside.com/earlgrey/sitemap.xml</loc>
    </sitemap>
    <sitemap>
       <loc>http://www.hkd.cside.com/hkd/sitemap.xml</loc>
    </sitemap>
    <sitemap>
       <loc>http://www.hkd.cside.com/rufuna/sitemap.php</loc>
    </sitemap>
 </sitemapindex>

***xreaの場合
 404 (ファイルが見つかりません)
 エラー ページのヘッダーで 200 (OK) ステータスが返されました。
というエラーがでるので、
+ルートに.htaccessというファイルを作成
 ErrorDocument 404 /error.html
という内容を書き込む
+ルートにerror.htmlを置く。
+内容は「ファイルが見つかりません」のようなことが書いてあるといいですね。

**更新通知の設定
 http://www.google.com/webmasters/sitemaps/ping?
 sitemap=http%3A%2F%2Fwww.hkd.cside.com%2Fearlgrey%2Fsitemap.xml
上記を1行で。