It's better when it's simple

User Tools

Site Tools


DokuWiki and Search Engine Optimization (SEO)

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.


DokuWiki tries to produce semantically correct and valid XHTML. This means the structure of a document is easy to analyze by an automatic spider.

No matter how good the produced HTML is, SEO is very dependent on a page's 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 forth. This is also important as DokuWiki might use the first level 1 headline as the page title (see next section).

Meta Headers

DokuWiki creates all relevant headers to identify the page content (doctype, encoding, language). Other headers and metadata, such as keywords, OpenGraph, Twitter cards and description can be created using the keywords, socialcards and description plugins. The keywords header does not have a direct effect on search engine ranking:

You're right in that we generally ignore the contents of the “keywords” meta tag. As with other possible meta tags, feel free to place it on your pages if you can use it for other purposes - it won't count against you.

Google Webmaster Central

The same applies to the description. However, under some circumstances, the search engine is not able to create a meaningful description for the search result pages (called SERPs). In this case, providing a description has an indirect value: it helps the search engine user to select the right (in this case your) result. In other words, a good description helps to increase the site conversion in the SERPs1). The description plugin adds such an description and is highly recommended from a SEO perspective. One such scenario is the use of interactive content and low textual content.

Also, including keywords into the page has no negative effect and might be of advantage when using other tools and services (for example social bookmarking). In some cases, these services use the keywords from the meta header to create bookmarks and provide other services. Keywords can be manually defined per page using the keywords plugin.

By default DokuWiki uses the pagename in the title element. You may want to use the first level 1 header instead by enabling the useheading option (you can also remove underscores in different way). This has the advantage that your title (which is displayed in the SERPs) becomes more descriptive and you have a better influence about the keywords in the title. Also it allows you to have different keywords in the URL (which is influenced by the pagename) and the title; both are an important factor in onpage-SEO.

From a SEO perspective, you should keep the name of the Wiki short (in the case of this wiki: [DokuWiki]) as the title is repeated in the page title on all pages. That way, your title is focused on the page keywords in the beginning of the title (here: “seo [DokuWiki]”), indicating to the search engine the actual content of the page.

Duplicate Content

Duplicate content is prevented by DokuWiki by specifying the canonical url which is enabled in the DokuWiki configuration by default.

Wiki Spam

DokuWiki tries to 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. at this wiki spam usually never lasts longer than a day) or have a closed user group you may want to lower the indexdelay option or even set it to 0 for disabling delayed indexing.


DokuWiki normally uses URLs in the form of Many search engines recognize this as a dynamic URL and change their spidering behaviour 2) accordingly. Google does spider such URLs but 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 URL rewriting to produce nice URLs.

Adding the 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 send404 to make DokuWiki respond with 404 Not Found to requests for non-existing pages.

You should use a plugin such as goto to redirect pages moved within your Wiki.

XML Sitemap

Several big search engine providers like Google, Yahoo and Microsoft allow you to submit whole site structures to their search engines through the XML Sitemap service. DokuWiki can automatically create an XML sitemap containing all of your wiki pages. See sitemap for more info.

Clean PHP Session ID

On some PHP installations the PHP Session ID is appended to each URL of your wiki. This is not desirable in terms of SEO. Please refer to the rewrite page for a solution.

More Information

SEO Wiki: “SEO Optimization using HTML Meta Tags,”
how is a cause for a lot speculation
seo.txt · Last modified: 2022-10-17 17:36 by

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki