Joomla

Remove the Joomla meta name generator tag

remove joomla meta generator

Do you want to remove the meta tag “generator” from your Joomla site?  It’s very easy to do.


In this post I will show you how to do it with a plugin, and also how to do it with a single line of code.

Why do I want to remove it?

Ideally you do not want large amonts of unnecessary code in your website. You do not want to make it harder for Google and search engines to find what they need–you want to make it easier. Now I understand, this one line of code isn’t exactly a ton of bloat, but it all adds up over time. A bit of code here, an extra meta there, and all of a sudden you have a huge index file that takes ages to load. Keep things tidy.

remove meta generator

Give me a plugin.  Code scares me.

By far the easiest way is to use the Joomla plugin ByeByeGenerator.  Install the plugin, enable it, verify the meta tag is removed in the source code and you are done.  Not only is the method the easiest, it will work for any version of Joomla.  1.5, 1.6, 1.7 & 2.5.  This method is also persistent, so if you change your templates a lot or do any updates, this plugin will always work and never get overridden.  But what if you are a purist?

enabled joomla plugin

I don’t want another plugin, just tell me how to do it manually

The method to removing the meta name generator tag for Joomla varies between versions.  On Joomla 2.5 you can simply add this code to your index.php file in your template.

JFactory::getDocument()->setGenerator('');

Put it just after the line //no direct access.  This method will vary greatly on what template you are using and from what company, so I cannot get too detailed.  For example YooThemes has a different template structure then RocketThemes.  You will have to noodle around a bit yourself in order to do this.  The main advantage of editing the template code instead of installing a plugin is less overhead.  The fewer plugins you have, the faster your site will be, and queries add up fast.

Conclusion

This is one of the few cases I’d suggest using a plugin over editing code.  This plugin totally removes the meta name generator tag, installs in no time at all and get’s the job done.  I use this plugin personally for the Joomla sites I build.  I heartily recommend it.

Tags: , , , ,

10

Merav

Merav Knafo is the founder and CEO of iJoomla, Inc. She loves writing about Joomla, usability and Social Networking.

Leave a comment

  • Avatar

    La Jolla Schools

    |

    It very important to remove jomla meta tag . If this plugin perform effectively then i will try it.

    Reply

  • Avatar

    MaryHolickStremmel

    |

    I use that plugin myself 🙂

    Reply

  • Avatar

    Ralph Pilkington

    |

    Got to say what a super read from using the plug to adding a simple line of code could not have been made easier well done @EP_Learning http://www.easypacelearning.com

    Reply

  • Avatar

    cullie

    |

    I am wondering how to do this in ja_purity. It has the jat3 system with it and I am fit to be tied on actually finding the correct answer to this! Thanks if anyone knows, I have tried many things, but it isn’t working!

    Reply

    • Avatar

      cullie

      |

      Finally figured it out! I had been working on it for days!
      I had to go to libraries>joomla>document>html>renderer

      find: $generator = $document->getGenerator();
      if ($generator)
      {
      $buffer .= $tab . ” . $lnEnd;
      }

      change to: //$generator = $document->getGenerator();
      if ($generator)
      {
      $buffer .= $tab . ” . $lnEnd;
      }//

      and it finally worked. I had to clear cache. logout and then restart foxfire. Not sure why I had to restart my foxfire, but that was the problem!

      Reply

  • Avatar

    Marzio Perez

    |

    Comment line number 99 this file libraries/joomla/document/html/renderer/head.php

    //$buffer .= $tab . ” . $lnEnd;

    😀

    Reply

  • Avatar

    James

    |

    I am new to Joomla, found this article while searching something else, are the generator meta tags added by the Joomla Template generator tools like Arti or TemplateToaster or these are present in all Joomla Templates ?

    Reply

  • Avatar

    Sky Blue

    |

    Awesome .. I have the JAT3 tiris also and this works perfect 🙂

    Reply

  • Avatar

    Josh

    |

    The code you provided worked perfect in Joomla 1.5. Took only a few minutes to make the change. Thank you!

    Reply

  • Avatar

    David Kley

    |

    There is another free alternative to ByeBye Generator, as it’s functionality is a bit limited. The Joomla metadata suite plugin allows you to remove the generator tag or brand it.

    You can also remove the author tag, and add in additional metadata items for your social profiles including OpenGraph data.

    Download: https://webdesignandcompany.com/products/joomla-metadata-suite/

    Hope this helps.

    Reply