Thursday, April 18, 2013

Joomla SEO meta tag recommendations



  1. In the Global settings area of Joomla’s administration panel, insure the fields Global Site Meta Description and Global Site Meta Keywords are empty.
  2. Change Joomla’s meta tag logic so that Joomla won’t needlessly insert empty tags in a page. The file islibraries/joomla/document/html/renderer/head.phpand the changes to make are in red. Technical folks may want to download a patch file for version 1.5.
    // Generate META tags (needs to happen as early as possible in the head) foreach ($document->_metaTags as $type => $tag) { foreach ($tag as $name => $content) {if($content != ''){ // only output tags if they actually have a value - Sean Carlos http://antezeta.com/ if ($type == 'http-equiv') { $strHtml .= $tab.'<meta http-equiv="'.$name.'" content="'.$content.'"'.$tagEnd.$lnEnd; } elseif ($type == 'standard') { // don't output <meta name="robots" content="index, follow" /> as this is too embarassing: its the default for search engines! - Sean Carlos http://antezeta.com/ if($name == 'robots' && $content == 'index, follow' ) { $content = 'index, follow'; // do nothing } else { $strHtml .= $tab.'<meta name="'.$name.'" content="'.str_replace('"',"'",$content).'"'.$tagEnd.$lnEnd; } } } } }$documentDescription = $document->getDescription(); if ($documentDescription) { // only output tags if they actually have a value - Sean Carlos http://antezeta.com/ $strHtml .= $tab.'<meta name="description" content="'.$document->getDescription().'" />'.$lnEnd; }if($document->getGenerator() != '') { // only output tags if they actually have a value - Sean Carlos http://antezeta.com/ $strHtml .= $tab.'<meta name="generator" content="'.$document->getGenerator().'" />'.$lnEnd; }
    In version 1.6, it isn’t necessary to change the logic which sets the meta description which has already been fixed.
  3. To remove the meta generator tag, it is necessary to add a line of code to the main template file, such astemplates/rhuk_milkyway/index.php
    <head> <?php $this->setMetaData('generator',''); ?> <jdoc:include type="head" />
Unfortunately these changes need to be reapplied should the Joomla software and/or theme be updated.

Remove the "Powered by Joomla!"


Joomla 1.5

Starting with Joomla 1.5 and its move to Internationalization and full support of UTF-8, messages for footer.php and other Joomla pages has been moved to a language specific file.
If you want to change the text, go to the language directory, go to the folder of the language you want to change, find the mod_footer.ini file and change the relevant text. For British English, the specific file is language/en-GB/en-GB.mod_footer.ini. Remember that you may not remove copyright and license information from the source code.
If you want to remove the footer entirely, go to Extensions > Module Manager and unpublish the footer module.
Other places where can look for options to make changes are these. If you find code related to footers in these files, you can either "comment it out" or remove it:
  • /includes/footer.php file.
  • index.php file for your active template

Joomla 1.0
You may remove that message, which is in footer.php. You may however not remove copyright and license information from the source code.