In our small post on how to get the Joomla version, we mentioned that some website developers hide the Joomla version for security reasons. So what are these “security reasons” and how do they hide it?
The main reason why some website developers hide the Joomla version is because there are malicious scripts running on the Internet that have a single goal of finding which type of CMS is powering each and every website. By knowing the type of the CMS that a certain website is running, the attacker will be able to know what are the vulnerabilities associated with this website, and then start performing his attacks accordingly. For example, if an attacker finds out that a certain website is running Joomla version 1.0, he will be able to immediately know what are the vulnerabilities of this website (they are listed by the Joomla community), and then attack it based on its vulnerabilities.
Now how can the Joomla version be hidden?
Well, you have to have some basic programming experience (if you don’t, then please contact us, and we’ll hide the Joomla version for you), and there are two ways to do it:
- Changing a core Joomla file
Open the file
/yourwebsiteroot/libraries/joomla/document/html/renderer/head.php. Search for the line:
$strHtml .= $tab.'<meta name="generator" content="'.$document->getGenerator().'" />'.$lnEnd;
Change it to:
//$strHtml .= $tab.'<meta name="generator" content="'.$document->getGenerator().'" />'.$lnEnd;
- Change the main template file
Open the file:
Add the below code immediately before this line
<jdoc:include type="head" />:
$document = &JFactory::getDocument();
Both methods have advantages and disadvantages. If you follow the first method, then you are changing a core file, which is not recommended, as you will have problems if you upgrade your Joomla version. On the flip side, if you follow the first method, then you won’t have to do any extra work if you change the template. If you follow the second method then you will be safe as you won’t touch the core files, however, you will have to redo the above in case you decide you want to change/upgrade the template.