====== Google Sitemap ====== [[DokuWiki]] can automatically create an [[http://www.sitemaps.org/|XML Sitemap]] used by several big search engines like Google, Yahoo, and Microsoft. The sitemap creation is enabled with the [[config:sitemap]] option. The sitemap is placed in the top directory of your DokuWiki installation. Depending on the availability of gzip support in your PHP install it will either be named ''sitemap.xml.gz'' (when gzip is available) or ''sitemap.xml'' (with no gzip support). Nearly all modern PHP installs have gzip support enabled, so ''sitemap.xml.gz'' is your best guess. When the sitemap is updated, DokuWiki will inform the following search engines automatically through a HTTP "ping": * [[http://www.google.com|Google]] * [[http://www.yahoo.com|Yahoo]] * [[http://www.live.com|Microsoft Live/MSN]] ===== Permission Setup ===== To be able to create a sitemap, the webserver needs to have write access to the sitemap file. The easiest way to make sure it has, is to create an empty **''sitemap.xml.gz''** file and change its permissions accordingly((See [[install:permissions]] on tips about permission setting)). If your sitemap won't be created you can try to get some debug output from the indexer by calling ''%%http://yourserver/dokuwiki/lib/exe/indexer.php?debug=1%%'' in your browser. To force your sitemap to be re-created, try temporarily setting the [[config:sitemap]] option to a large, negative value. ===== Sitemap Validity ===== Sitemaps are bound to a domain name. If your sitemaps contains URLs of the form ''%%http://domain.org%%'', the sitemap will not be valid when pulled from ''%%http://www.domain.org%%'' and vice versa. To make sure a canonical URL is used you can either configure the [[config:baseurl]] setting or redirect "mismatching" URLs via another [[rewrite|rewrite]] rule in your ''.htaccess'': **Rewrite example (Apache):** RewriteEngine on RewriteCond %{HTTP_HOST} !^www\.domain\.org$ [NC] RewriteRule ^(.*)$ http://www.domain.org/$1 [R,L] ===== Read more ===== * [[seo|DokuWiki and Searchengines]] * [[http://www.flagar.com/en/risorse/dokuwiki_google_sitemap|Info about Google sitemap for older releases]] * [[https://www.google.com/webmasters/tools/siteoverview|Google Webmaster Tools, use it to manage your sitemaps and monitor googlebot crawling reports about your site]]