Translations of this page?:

Google Sitemap

DokuWiki can automatically create a Google Sitemap. To enable this feature use the 'sitemap option'.

When enabled DokuWiki tries to create a sitemap named sitemap.xml.gz, in your DokuWiki root directory. You need to make sure DokuWiki can write this file. If the root directory isn't writable you should create an empty file named sitemap.xml.gz and set it's permissions accordingly.

After creating a new sitemap DokuWiki will try to “ping” google to inform it about the availability of the new sitemap by loading http://www.google.com/webmasters/sitemaps/ping?sitemap=<your_sitemap_url> in the background.

Notes:

  • The file sitemap.xml.gz will be used if 'usegzip' is enabled (default). The file sitemap.xml will be used if 'usegzip' is disabled.
  • Google sitemap, has a site ownership verfication service. The option most easily applicable to DokuWiki is “Upload an HTML file”. First declare http://your.site.tld/dokuwiki_basedir/ as your site. Then create the file that Google suggests, say http://your.site.tld/dokuwiki_basedir/googlexyz.html (must be readable by the user under which your webserver runs). However, you will also need to enable 'send404', for this to work. The reason is that DokuWiki, by default, answers with “200 OK” even for non-existing pages. Google expects the standard “404 Not Found” for non-existing pages, so when it tests for a fictional page (say http://your.site.tld/dokuwiki_basedir/noexist_xyz.html) and gets a “200 OK”, it cancels the verification.
  • See http://bugs.splitbrain.org/?do=details&id=815 for a bug that applies to dokuwiki-2006-03-09 and makes the automatic “pinging” of Google when your sitemap is created/revised point to a wrong sitemap URL.
  • Google expects the submitted URLs to be of the same form as the URL you add. That means if the site URL is of the form http://domain.org, google expects all submitted URLs without a leading “www” and in case of http://www.domain.org with leading “www”. However, if the sitemap creation gets triggered while someone is browsing your site and the URL doesn`t match your google sitemap setup, google complains about “sitemap errors” (URL mismatch). This can be omitted by either setting a fixed canonical base URL or by redirecting “mismatching” URLs via another rewrite rule in your .htaccess (example below).
  • Sitemap is generated by the indexer . To launch it manually, and debug it, try : http://yourserver/dokuwiki/lib/exe/indexer.php?debug=1


Rewrite example (Apache):

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.domain\.org$      [NC]
RewriteRule ^(.*)$       http://www.domain.org/$1 [R,L]

Read more:

Google Sitemap Problems

To launch it manually, and debug it, try : http://yourserver/dokuwiki/lib/exe/indexer.php?debug=1

Dokuwiki-20061106. I've done. By I have this answer:

runIndexer(): started
metaUpdate(): started
runSitemapper(): started
runSitemapper(): using sitemap.xml.gz


here process hangs-up with no other output.
No sitemap.xml.gz is created.
Solved creating a new empty sitemap.xml.gz in dokuwiki root directory. It seems needed even if dokuwiki rootdir is writeable for user apache.
I thing may be useful a better output from debug.

 
wiki/sitemap.txt · Last modified: 2008/04/21 13:47 by 195.113.183.162
 
Imprint Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsTranslate