How to remove meta tag “generator” in Joomla?

Joomla uses following “generator” meta tag in HEAD for identification. You might be interested in removing it for security reasons.

 <meta name=”generator” content=”Joomla! 1.5 – Open Source Content Management” />

In this article you will learn two methods (easy and difficult) so you will be able to change it or simply remove it.

Method One:

Put following code in your template before or after the <head> tag start

<?php $this->setGenerator(‘Anything you want to set’); ?>

Method Two:

The file you want to edit is called head.php and is found here:

you will want to find the following code (~line 167):
$strHtml .= $tab.'<meta name=”generator” content=”‘.$document->getGenerator().'” />’.$lnEnd;

you can turn it off by simply commenting the line with // at the beginning:
//$strHtml .= $tab.'<meta name=”generator” content=”‘.$document->getGenerator().'” />’.$lnEnd;

 Recommended Method:

Method One is recommended. Because if you use method two then your changes will be gone, each time you upgrade your Joomla to newer version.

Have fun with Joomla!

Leave a Reply

Your email address will not be published. Required fields are marked *