Manual:GenerateSitemap.php/ja

詳細
generateSitemap.phpはMediawikiのインストールにおいてhttp://www.sitemaps.org/を作成するためのSpecial:MyLanguage/Manual:Maintenance scriptsメンテナンススクリプトです. サイトマップはgooglebotのような 検索エンジンロボットにウェブサイトをクロール(巡回)させる際に効率を更に高めます. （ただしボットがサイトマップ・プロトコルをサポートしている場合に限る）

By default, the script generates a sitemap index file and one gzip-compressed sitemap for each namespace that has content. See #Options for a list of options that can be passed to the script.

You may need to set up a cron job to update the sitemap automatically.

For generic instructions on using MediaWiki's maintenance scripts, see.

オプション
 
 * displays the available options for

 
 * The file system path to save to, e.g . Note, this directory must be viewable online!

 
 * What site identifier to use for the wiki, defaults to

 
 * The domain-relative URL that points to, e.g.
 * /sitemap/
 * If specified, gets prefixed to the filenames in the sitemap index. This is needed because some search engines like Google require absolute URLs in sitemaps. You should specify  also; the values will often be similar, but having them separate allows the script to accommodate even unusual setups.

 
 * The protocol and host name to use in URLs, e.g.
 * https://en.wikipedia.org
 * This is sometimes necessary because server name detection may fail in command line scripts and will show up only as "localhost" or "my.servername" in the xml files.



 
 * Whether or not to compress the sitemap files. The default setting is.

 
 * If this option is added redirects are skipped and thus not listed within the sitemap. This is recommended since Google can complain about redirects. However the default setting is not to skip redirects.

例
Creating a sitemap for Google Webmaster Tools:

First (in $IP, i.e. document root which is where your "LocalSettings.php" file is located):

Then:

Non-latin domains need to use Punycode.

LocalSettings.php 内の関連設定

 *  : Array of namespaces to generate a Google sitemap for, or false if one is to be generated for all namespaces. The default setting is.


 *  : Custom namespace priorities for sitemaps. This should be a map of namespace IDs to priority. The default setting is.