How can I create a simple Google Sitemap for Search Engine Optimisation?
SEO, "Search Engine Optimisation" is big nowadays. To help Google spider your public Foswiki website, you can create a file with page urls.
As Google says it: "Submit a Sitemap to tell Google about pages on your site we might not otherwise discover"
Since Google Sitemap accepts a simple list of urls instead of a generated XML file, our job is a lot easier and can simply be done within Foswiki.
What you need:
- Create a page with a
SEARCH to generate the list of urls
- Install AttachContentPlugin to be able to write the search results to a static file
- This is because constructs like
Topic?section=list;skin=text may run into problems with your robots.txt settings
- For SEO, do not use WikiWords as topics names; use underscores to separate name parts, like:
Annual_report. Google reads this as words in a sentence.
Example search:
%STARTATTACH{"sitemap.txt"}%
http://www.foswiki.org/Support/Faq20
http://www.foswiki.org/Support/Faq67
http://www.foswiki.org/Support/Faq70
%ENDATTACH%
Also put this in the topic:
<form action="%SCRIPTURL{"save"}%/%WEB%/%TOPIC%" method="post">
<input type="hidden" name="action_save" value="1" />
<input type="submit" class="foswikiButton" value="Update sitemap file" />
</form>
[[%ATTACHURL%/sitemap.txt][View sitemap file]]
Then post that sitemap file url to
Google Sitemap.
--
ArthurClemens - 30 Apr 2009
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. 
