SEO, Page Rank, Hacks and Joomla 1.5

When the site came online, Joomla 1.5 was still in the beta stage, thus the decision was to use Joomla 1.x. I have used a third party script to implement “Search Engine FriendlyURL.

In a few months, the site received “Page Rank 5” from Google until it was decided to upgrade to Joomla 1.5. I noticed that the website page rank started to deteriorate. I tried to implement several SEO methodologies including submission to several search engines where all I got was spam emails.

All my efforts were unsuccessful until now as the page rank of is now zero.

Lately, I tried comparing Joomla 1.X and Joomla 1.5. I found out that in Joomla 1.5, the page title except the home page does not include the configuration file “Site Name” variable. In Joomla 1.X, the “Site Name” is always a part of the page title as a prefix.

Is this an intentional omission by the Joomla developers? Or the developers of Joomla missed it?

I have searched the Joomla forum but there has been no concrete solution to the issue. I have found a solution myself.

To include the “Site Name” on all pages, I did some hacks on the Joomla Core. I should not be doing this but I am already desperate on to increase the website page ranking.

This hack may not be the best solution but it worked for me and I want to share it to others.

Search for the file head.php under the “libraries/joomla/document/html/renderer” folder. Search for this line

$strHtml .= $tab . '' . htmlspecialchars($document->getTitle()) . '' . $lnEnd;

And replace it withe the following

// SEO Hack
// declare a new configuration variable
$config = new JConfig();
// do not add the site name on the Frontpage
if(( $_SERVER['REQUEST_URI'] == '/') || ( $_SERVER['REQUEST_URI'] == '' ) ) $site_name = '';
else $site_name = $config->sitename . " - ";
// Modifiled version
$strHtml .= $tab . '' . $site_name . htmlspecialchars($document->getTitle()) . '' . $lnEnd;

This hack will include the Site Name is all pages separated by the character “-” (replace this with any character you want).

Update: This hack has been updated.

10 thoughts on “SEO, Page Rank, Hacks and Joomla 1.5

  1. Theola Mazella

    Good day i was wondering are profile backlinks worth it? in getting your site ranked higher

  2. Ver Post author

    I truly don’t understand why Joomla! don’t incorporate this in their core codes. This issue has been there since the beginning of J1.5.

  3. Niko Paulanne

    Hope this add comment correctly , code to add is:


    // get doc and docs title
    $mydoc =& JFactory::getDocument();
    $mytitle = $mydoc->getTitle();

    // update title
    $mydoc->setTitle($site_name.’ – ‘.$mytitle);


  4. Niko Paulanne

    Thank you for hack. I do not want to mess the default files so did this little bit differently.

    The more permanent way is to add code to your page-template and not mess with Joomla default and updatable files. Just add code just after usual:

    // Prevent direct access sans Joomla!:

    in template. Code to add (edit for your liking):


    // get doc and docs title
    $mydoc =& JFactory::getDocument();
    $mytitle = $mydoc->getTitle();

    // update title
    $mydoc->setTitle($site_name.’ – ‘.$mytitle);


  5. it work

    Thanks, it really work after some minor editing and adjustment

  6. Ver Post author

    Hi weebit,

    I have used this hack so I know it works.

    You mentioned about this line
    if(( $_SERVER[‘REQUEST_URI’] == ‘/’) || ( $_SERVER[‘REQUEST_URI’] == ” ) ) $site_name = “;
    If you copied the code in my post directly and pasted it, Windows has a bad habit of replacing apostrophe with tilde. Make sure you have corrected this problem.

  7. weebit

    I saved it in a text file, and checked every Character to make sure it copied over ok. I will give it a run again this evening.

  8. weebit

    Darn it… It did not work. said there was a extra “;” on line 89. I don’t know line 89 from 85. Loaded into a text editor and it says the line in question is:

    if(( $_SERVER[‘REQUEST_URI’] == ‘/’) || ( $_SERVER[‘REQUEST_URI’] == ” ) ) $site_name = “;

    so I removed the end “;” because it is the only one on that line, but then I got a new error.

Comments are closed.