How to remove your meta tag generator from Joomla header

How to remove your meta tag generator from Joomla header

Your Joomla site always comes with a default meta generator to show that your website is a Joomla site, and sometimes it will show its version as well. It is important to hide this for security measures if you do not want others to see your source code and know it is a Joomla site and what version it may be.

It is good to be aware that the changes you make will be overwritten when upgrading your Joomla version.

  1. Open your head.php file
  2. joomla_header_1

    • Open your FTP program.
    • Navigate to this file: (root directory)/libraries/joomla/document/html/renderer/head.php
    • Open your head.php file with a Text Editor.
  3. Navigate to the meta generator section of the PHP code
  4. Joomla Header

    Look for the line of code that creates a function called getGenerator().

  5. You can remove the line of code by commenting it out and your site will now show a meta name generator.
  6. Joomla Header Generator



    Adding 2 slash lines in front of the code will prevent the website from rendering it as code. So it’s basically removed, without removing it. It’s always safe to do the commenting method so you can always revert back to previous changes.

  7. Instead of commenting it, you can change the code

    Joomla Header

You can change this to any type of meta name you’d like. I changed my site to “author” with my name in the double quotes, removing everything else within the quotes first.

Congratulations! You now have full control of your header file, but remember you are able to edit most sections using your admin panel but it is good to know how to remove sections and where to find the actual file your header code is generated at.