====== DokuWiki and Search Engines ====== Search Engine Optimization (SEO) is some kind of mystery. Because the big search engines don't reveal their complete methods of spidering and ranking it is always some guesswork to determine what's right and what's not. In general SEO boils down to tuning three things: //content//, //meta headers// and //URLs//. This document should give you some ideas how DokuWiki works in these areas and what additional SEO methods are available. ===== Content ===== DokuWiki tries to produce semantically correct and valid XHTML. This means the structure of a document is easy to analyze by an automatic spider. However how good the produced HTML is is highly dependent on a pages source. You should try to markup your document in a logical way. For example use headlines in descending order beginning with a level 1 headline. Use headlines for headers (not a bold paragraph), use lists for things that are a list and so on. ===== Meta Headers ===== DokuWiki creates all relevant headers to identify the page content (doctype, encoding, language). The //keyword// or //description// meta headers can be adjusted through [[plugin:meta]] or [[plugin:tag]] plugin. However the popular search engines do not use these headers anymore because of extensive abuse by spammers. DokuWiki tries to [[wiki:antispam|fight wiki spam]] by several ways. One of them is called delayed indexing and directly influences how search engines spider your page. When enabled it will set the //robots// meta header accordingly to the age of a page. Only pages which were not edited for a certain time (default: 5 days) will be allowed for spidering. The idea is that the community will have removed any spam in this time. This means only a page which is considered as good by the wiki users will be added by search engines. If you have a quick community (eg. here at splitbrain spam usually never lasts longer than a day) or have a closed user group you may want to lower the [[wiki:config#indexdelay]] option or even set it to 0 for disabling delayed indexing. By default DokuWiki uses the [[wiki:pagename]] in the //title// attribute. You may want to use the first level 1 header instead by enabling the [[wiki:useheading]] option. ===== URLs ===== DokuWiki normally uses URLs in the form of %%http://example.com/doku.php?id=page%%. Many search engines recognize this as a dynamic URL and change their spidering behaviour ((how is a cause for a lot speculation)) accordingly. Google [[google>inurl:"doku.php?id="|does spider]] such URLs but [[http://www.google.com/webmasters/guidelines.html|recommends]] to keep the numbers of used parameters low. To improve the readability and help other search engines with your wiki, DokuWiki comes with a config option for two different methods of [[wiki:rewrite|URL rewriting]] to produce nice URLs. Adding the [[wiki:config#useslash]] option helps to increase your ranking further. ===== Non-existing Pages ===== When a page does not exist, DokuWiki will issue a '200 OK' HTTP response. In a wiki this is a wanted behaviour. However, it is speculated that search engines may perceive it as indicative of a link farm. You can enable [[wiki:config#send404]] to make DokuWiki respond with “404 Not Found” to requests for non-existing pages. ===== Google Sitemap ===== Google allows you to submit whole site structures to their search engines through the [[http://www.google.com/webmasters/sitemaps|Google Sitemaps]] service. DokuWiki can automatically create a XML sitemap containing all your wiki pages. See [[wiki:sitemap]] for more info. ===== Clean PHP session ID ===== http://wiki.splitbrain.org/wiki:rewrite#clean_php_session_id ===== Sample Meta tag description which changes ===== For my website [[http://live.naplesplus.us]], I have the following in my MAIN.PHP (found under templates) '' '' Now, depending on the page, the description can vary. The output is something like: start [Collier County Community Wiki Server] | http://live.naplesplus.us | Naples' only free, live editable webpages! | start.txt · Last modified: 2007/05/14 05:54 by 76.101.3.170 ==== Description of the parts ==== // page info - same as what is at bottom of most dokuwiki pages //