Manual talk:GenerateSitemap.php/Archive

Google webmaster tools
google webmaster tools wants that the full url of each sitemap gz file is listed in the index file. this doesn't happen even when i enter --server parameter to the script. so, this code has to be modified:

function indexEntry( $filename ) { return "\t \n". "\t\t $filename \n". "\t\t {$this->timestamp} \n". "\t \n";

add your site url before the $filename. after that google will not complain about invalid url in the sitemap index file. i hope mediawiki developers address this problem.

Note from BarkerJr: This is the error specified above: "We've detected that a Sitemap you've listed doesn't include the full URL." -BarkerJr 11:56, 15 August 2008 (UTC)


 * FYI, you should edit your url to the location the SITEMAP is saved to I save mine in domain.com/sitemap, so my setup is:


 * -- Ipstenu 14:00, 19 September 2008 (UTC)

Example of usage
I've installed MediaWiki on a separate subdomain, and have set up a cronjob to automatically update the sitemap every hour:

Run: crontab -e

Create a line that looks something like this: */45 * * * * /usr/local/bin/php /home/httpd/public_html/wiki/maintenance/generateSitemap.php wiki.mydomain.com --fspath /home/httpd/public_html/wiki/

Go to Google Webmasters, add your site (e.g. wiki.mydomain.com) and then add the sitemap (e.g. sitemap-index-foo_bar.xml)

Awful Manual
This is a laugh. Took me very long to set it up...

Options
--help
 * show this message

--fspath= 
 * The file system path to save to, e.g /tmp/sitemap/

--server= 
 * The protocol and server name to use in URLs, e.g.
 * http://en.wikipedia.org. This is sometimes necessary because
 * server name detection may fail in command line scripts.

--compress=[yes|no]
 * compress the sitemap files, default yes

--Subfader 11:53, 19 March 2008 (UTC)

Meta tags and priority
I use an extension to change meta tags (keywords, description, priority, and robots for follow and index). It's possible to force the priority and index using those tags?--Eloy 00:39, 18 June 2008 (UTC)

Priorities
It'd be nice if there was more fine tuning on the priorities it chooses. I'd like to have newer and more popular articles to have higher priorities. Right now all the priorities are doing is having regular articles be checked more often than talk and user pages, etc. Also Google now complains if a sitemap has the same priority for every page. -Nais 21:10, 2 July 2008 (UTC)
 * I agree! AFAIK when all the pages in sitemaps have the same priority the site itself won't be ranked as high as it should be (as it's more difficult for googlebots to judge what's important and what's not). Is there any kind of solution to rank pages with most edits and newest pages higher than older ones? --83.145.207.200 15:35, 11 November 2008 (UTC)

How I fixed sitemap
So here is how I fixed it - http://forum.appropedia.org/blog/finally-working-mediawiki-sitemap. This is based on the fix from OLPC - http://wiki.laptop.org/go/SEO_for_the_OLPC_wiki/sitemapgen.

Good luck, --LRG 03:49, 24 August 2008 (UTC)