XMLSitemap Plugin

From GeeklogWiki
Jump to: navigation, search

Introduction

The purpose of the XMLSitemap Plugin is to create XML sitemap files as supported by all major search engines. Such a sitemap file is meant for use by search engines to make it easier to find all the content available on your site.

Basically, a sitemape.xml file is a list of the URLs of all content pages on your website. For more information, see sitemaps.org.


Configuration

The XMLSitemap Plugin does not have any UI but only a section in the Configuration admin panel: Configuration > XMLSitemap.

Here, you can configure the file names of the two types of sitemaps that are supported and which content should be added to the sitemap. You can also define the priority and update frequency for that content.

Sitemap Files

The name of the "normal" sitemap file is sitemap.xml. Some search engines will look for it by that name, so you probably don't want to change it.

The mobile sitemap is a variation of the sitemap file aimed at mobile devices and content optimized for mobile devices. It is disabled by default.

Please note that both the sitemap and the mobile sitemap will be created in the site's webroot, i.e. your public_html directory (or equivalent). As such, that directory has to be writable by the webserver.

Sitemap Content

Contents of Sitemap

The "Contents of sitemap" option will let you specify the sort of content that should be listed in the sitemap files. This includes the articles as well as content provided by plugins.

At the time of this writing, only the Calender Plugin, Links Plugin, and Static Pages Plugin that ship with Geeklog have support for sitemaps built in. The XMLSitemap Plugin will try and detect any additional plugins with built-in sitemap support automatically when they are installed. If that did not work, you may have to add a new entry for such a plugin manually.

Plugins to exclude from Sitemap

The "Plugins to exclude from sitemap" option will let you list plugins that you don't want to add their content to the sitemap files.

This list defaults to include the Links Plugin. The issue here is that the plugin's content is really only the URL of the linked-to site. Also, the Google Webmaster Tools will warn about the plugin doing a 301 redirect. So, under most circumstances, the Links Plugin doesn't really provide content that you want to be listed in your sitemap.

Pointers for Plugin Authors

Plugin authors should look into adding support for the PLG_itemSaved, PLG_itemDeleted and PLG_getItemInfo Plugin API functions if you want your plugin's content to be added to the sitemap.

Other Options

Please refer to sitemaps.org for information about the priority and update frequency.


Publishing your Sitemap

The recommended way to inform search engines about your sitemap file is to add the following line to your robots.txt file:

Sitemap: http://www.example.com/sitemap.xml

Please note that the sitemap location has to be specified as a complete URL, including "http:" and the file name.

For Google, you can also log into your Google Webmaster Tools account and specify the sitemap there.