- Computers & Software»
- Computer Software
Give your MediaWiki Installation an SEO optimisation and add Google Advertising
Change the basic MediaWiki install
MediaWiki is a software package that consists of various web scripts (predominantly php) running from a mySQL database. It is a very powerful tool that is hampered by the fact that the standard install of the software comes without any real thought to SEO. This article explains what you need to do to optimise MediaWiki to make it a lot more search engine friendly.
A standard MediaWiki installation will give you almost all the features and functionality that you need; If you are a regular user of Wikipedia some of the functions and mark-up language that you use there will not be included. To give your MediaWiki installation an SEO tune-up you will need to do some of the following actions:
- Add meta tags to the pages served
- Add Google Analytics and Google Adsense
- Modify the URL’s of the MediaWiki content pages so that they become “pretty URL’s”
- Modify the default “Main Page” to a more suitable keyword related title
There are some further changes that could be made. For example if you are planning on using the wiki as it was intended with the public being able to create accounts then you will have to consider where you place your Google Adsense and who will create meta tags for each page. You will also need to be able to customise the keywords for each page so that the URL, keywords and content all have a good relevance to one another.
How would you do this?
If you are an expert user then you would be able to make modifications to the core php files that run Mediawiki. However if you are a novice programmer then it is still within your reach thanks the software being open source. There are a number of modules that you have access to, these are known as extensions. MediaWiki extensions are php files that are added in the extension folder and called from the LocalSettings.php file. They include additional code to either extend or add features.
These are much easier to use as someone has done all the work of creating the function but you will still need to add a line of code or modify your LocalSettings.php file in order to integrate them into your MediaWiki installation. Out of the list of examples I have given above some required more complicated actions like adding an SQL table to allow the extension to work.
1) Add meta tags to the pages served
Meta tags containing keywords are vital to help search engines determine what the content of the page will be about and there is an importance to creating meta tags that are linked to the content of the page. There are at least two MediaWiki extensions that could be used for this.
The second MediaWiki extension involves a more complicated change to MediaWiki. As part of this you will need to add a table to the mySQL database that stores all of the content pages.
2) Add Google Analytics and Adsense
Both of these tools are used commonly to monetise sites and there is no reason why your website should be any different. You can simply add two more extensions to your MediaWiki installation to include these.
For Google Analytics you could try:http://www.mediawiki.org/wiki/Extension:Google_Analytics_Integration
For Google Adsense the following MediaWiki extension allows you to add adsense through the addition of some new MediaWiki markup tags. If you do use this extension then you would be best ensuring that the general public is not allowed to edit your site as they could add too many instances of Adsense which would break your terms and conditions or they could just remove the advertising!:
3) Modify the URL’s of the MediaWiki content pages so that they become “pretty URL’s”
For search engine readability the URL of your content pages will be important. Rather than http://www.yourdomain.com/?=index.php/article_name you should be opting for a much clearer url like http://www.yourdomain.com/Article_Name. Here you will perform a URL rewrite using an .htaccess file. This is a complicated change as you can compromise the security of your site by doing this incorrectlyModify the default “Main Page” to a more suitable keyword related title
4) Modify the default “Main Page” to a more suitable keyword related title
This perhaps the easiest change to be made. Simply go to your MediaWiki:MainPage and edit the title.
Why bother with a MediaWiki install?
There is a strong school of SEO practice that relies on targeting keywords with simple sites that answer specific questions. Rather than creating multiple sites on various topics you could simply build one site to house all of your information. The advantages being that you no longer need to manage multiple sites and can focus on the quality of information in your content. As well as this there is less need to create different brands instead relying on a central brand or theme that encompasses all of your chosen topics.
A wiki lends itself well to a team of people who want to produce informative content easily. Even the time spent writing MediaWiki markup can be minimised. You could install OpenOffice and add the MediaWiki extension so that documents can be exported in MediaWiki markup. MediaWiki templates will save you time as well by inserting common items that recur on pages.