ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Give your MediaWiki Installation an SEO optimisation and add Google Advertising

Updated on January 28, 2013

MediaWiki logo

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:

  1. Add meta tags to the pages served
  2. Add Google Analytics and Google Adsense
  3. Modify the URL’s of the MediaWiki content pages so that they become “pretty URL’s”
  4. 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:

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 you should be opting for a much clearer url like 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.


    0 of 8192 characters used
    Post Comment

    • profile image


      2 years ago

      Embroidery MIX - we offer big collection of machine embroidery designs. We also offer machine cross stitch digitizing. We are adding new free designs every week.


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)