Chette Soriano
home . about . contact me
Chette Soriano *
Changing ordering of page title and site name in Joomla | Print |  E-mail
Written by Chette Soriano   
Monday, 02 April 2007

It is good SEO practice to put the page title first in your title tags, and then your site name. Unfortunately, by default, Joomla places the site name first before the page title.

To change this, grab a copy of the file /includes/joomla.php

Around line number 507, replace this:

$this->_head['title'] = $title ? $GLOBALS['mosConfig_sitename'] . ' - '. $title : $GLOBALS['mosConfig_sitename'];

With this:

$this->_head['title'] = $title ? $title .' - '. $GLOBALS['mosConfig_sitename'] : $GLOBALS['mosConfig_sitename'];

Trackback(0)
Comments (26)add comment

julz said:

Thanks, what a co-incidence: this was exactly what I needed to fix. Saved me lots of time!

- julz
April 03, 2007

haran said:

It saved me time. Thanx Chette
May 08, 2007 | url

Emilio Molé said:

I´ve been searching how to do this for weeks without any results.
Thank you! smilies/smiley.gif
May 21, 2007

Ivan said:

Chette, thanks, thanks and thanks four your help... This topic (Changing ordering of page title and site name in Joomla) is just that I needed... You are a fantastic woman... Thanks...
May 25, 2007

jandrochan said:

Hola! Era justo lo que andaba buscando. Funciona estupendamente gracias. smilies/wink.gif
October 08, 2007 | url

dglite said:

Excellent, helped me a lot, thanks for your help and keep on working for the community!
November 02, 2007 | url

Juan said:

Thanks that helps a lot for SEO
November 14, 2007 | url

Marwen said:

Thank you very much !
December 03, 2007 | url

jonn said:

thanks for your help
January 13, 2008 | url

Jonathan said:

Can't believe I found this!!! Thank you smilies/grin.gif
January 22, 2008

fifi said:

oh thanx u!
i really neede this..
smilies/smiley.gif

regards, fifi smilies/wink.gif
January 27, 2008

Tony Lindskog said:

Thanks for the tip - it is real sad that one needs to hack the source code to get such a basic thing to work.

I am writing an SEO article for Joomla and I will include this tip as well as a link back for the tip.
March 28, 2008 | url

Tony Lindskog said:

Hi Chette, I just wanted to let you know that I did write the article and gave you kudos and link: http://www.joomlaviews.com/joo...32983.html
March 29, 2008 | url

Tomelloso said:

Wow, really great tip, I'm searching some solution for this for my joomla real estate and found this. Thanks for share.
April 15, 2008 | url

LortGob said:

Thanks, fast and easy!
May 31, 2008 | url

SEO Expert NZ said:

Thank you for sharing this information. I will use it for my blog and change the order of title.
June 01, 2008 | url

wow gold said:

Thank you for sharing this information. I will use it for my blog and change the order of title. wow gold
October 11, 2008 | url

tome said:

Hi Chette, I just wanted to let you know that I did write the article and gave you kudos and linkhttp://www.wow-powerleveling-wow.com/
October 14, 2008

Deepa said:

Its great. But in joomla stable version, the path to be changed is in 'librariesjoomladocumentdocument.php' in that we have a function called 'setTitle($title)'. The title is actually rendered from there. So you can change title according to your wish
October 15, 2008 | url

webhosting service said:

A good article, really helpful
October 23, 2008 | url

webdesign said:

Very good smilies/grin.gif
October 23, 2008 | url

web hosting said:

thanks for sharing this joomla seo tips,Most cms' title of joomla is not seo friendly ,like worddpress,hope you can write some thing for wordpress
October 23, 2008 | url

Deepa said said:

Its great. But in joomla stable version, the path to be changed is in 'librariesjoomladocumentdocument.php' in that we have a function called 'setTitle($title)'. The title is actually rendered from there. So you can change title according to your wish wow gold
November 05, 2008

josh said:

hi all! great post but im having some issues, Im using stable version 1.0.13 and using sh404 for seo. The problem is when I edit the code as above I get an error like "
SH404SEF : headers were already sent when I got control!
Killed at line 149 in sef404.php: HEADERS ALREADY SENT (200)
URL=http://www.tsibatsiba.co.zaoption=com_frontpage&Itemid=42
OPTION=com_frontpage "

any help would be greatly appreciated!

thanks

josh
November 18, 2008 | url

nike shoes said:

shoes say nike shoes
April 08, 2009 | url

Su said:

how can i do it in joomla 1.5.10.
the path u've mentioned is available in joomla 1.0..
here the path is /libraries/joomla/document/document.php
but what i need to replace instead of line 545.
function setTitle($title) {
$this->title = $title;
pls help.
May 01, 2009

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

busy
 
< Prev   Next >
* *
Main Menu
chette's articles
photo gallery
photos on the go
.........................
bookmarks
search
about
faq
contact me
Subscribe
www.flickr.com
chette's items Go to chette's photostream
Latest Articles
*

© Copyright 1997 - 2007 Chette Soriano. All rights reserved. Contact me.

* *