Jul
13
2012

MediaWiki SEO: 5 tips to improve your wiki

MediaWiki SEO: is your wiki website underperforming in search engines?

There are many reasons your MediaWiki installation can be lower in search engine rankings than you’d like, but the SEO tips below are a great place to start to ensure search engines such as Google and Bing can index your content correctly.

MediaWiki & SEO

MediaWiki is a great platform to share information on topics you care about, but there are some things you can do to help your MediaWiki’s search engine optimisation. This article lists 5 ways you can improve your MediaWiki website’s SEO-worthiness.

1. Add an XML sitemap

Create an XML sitemap to tell search engines where to find pages on your wiki. There are plenty of online XML sitemap generators, but we quite like this one by xml-sitemaps.com. You can then tell search engines where to look for your XML sitemap in two ways:

  1. In search engine companies’ webmaster tools control panels (see Google webmaster tools and BING webmaster tools);
  2. Through your website’s robot.txt file (more information about robots.txt files), by adding the line:Sitemap: /sitemap.xmlassuming that your sitemap.xml file is stored in the root directory of your MediaWiki installation.

It’s worth regenerating these on a monthly basis (or perhaps weekly, if you have the time!) to ensure the newest pages on your MediaWiki website are indexed.

 2. Custom your robots.txt file for MediaWiki

By default, MediaWiki has some utility pages (such as edit pages and specialBy default, pages), which are not hidden from search engines. It can help to better focus your wiki’s search engine prowess to hide these from being indexed by search engines using the robots.txt file. For a typical MediaWiki installation, you can block search engines from these pages by including:

User-agent: *
Disallow: /w/

Note that, depending on how your URLs are set up with MediaWiki, you may need to use different techniques to achieve this. MediaWiki.org has more information on using robots.txt with MediaWiki. It’s also worth noting that robots.txt is an arbitrary guideline; bots indexing your site are not obliged to follow your instructions in robots.txt (but the good ones, such as Google and BING will follow your restrictions).

3. Rewrite MediaWiki URLs to be clean

MediaWiki writes ‘dirty’ URLs by default, as this relies heavily on your server set-up. So, by default, you might see:

yourwiki.com/index.php/Main_Page

MediaWiki.org has a number of guides available depending on how you want your wiki’s URLs to appear. The most popular pattern for MediaWiki URLs is as follows:

yourwiki.com/wiki/Main_Page

Altering MediaWiki for clean URLs is not only beneficial for the future maintainability of your wiki and for indexing search engines, but is also beneficial to your visitors, who can now more comfortably edit the URL in their browser’s address bar to get to the pages they’re after. It’s a win-win situation!

4. Set Google Authorship up

As the most popular search engine in most parts of the world, Google handles a huge volume of search queries you could be missing out on for your wiki. Setting up Google Authorship ties your wiki to a Google Plus account, which provides benefits to your website’s conversion rates once it’s set up.

Follow the steps on Google’s page on Authorship to set this up; it can be a little long-winded, but the end result is your wiki gets more space in the search engine results pages, (SERPs), and should therefore stand out from your competitors.

5. Get proactive with spam

Part of Google and other search engine’s ranking algorithms is the apparent reputability of your wiki’s content. If you don’t patrol your content often and delete spam as soon as you can, your website’s reputability may be damaged in search engines. To avoid this for your MediaWiki site, ensure that you regularly:

  1. Check new users registering on your wiki and remove any spammy user accounts;
  2. Check new page creations to ensure the content is relevant to the primary topic(s) of your wiki;
  3. Keep your MediaWiki version up to date (upgrade MediaWiki regularly!); as with any software, out of date software is vulnerable to attack and may be susceptible to additional spam, which can damage your search engine ranking;

So, there you have it: 5 tips to help better your MediaWiki’s SEO! We’re always open to ideas, so if you have any particularly novel ideas for optimising MediaWiki websites, please do leave a comment!