How To Remove Drupal Meta Generator Tag

Drupal adds a Generator meta tag in head section to track and declare that this site runs Drupal. Sometime it cause security issue by exposing your CMS/platform information. If you want to remove this META from your drupal, here is a tutorial for this.

Like most other CMS on the web, Drupal leave it’s footprint called meta generator tag on your site’s source code for the purpose of tracking. The meta generator code placed in your site’s head section. The generator code is:

<meta name="generator" content="Drupal 7 (http://drupal.org)" />

Unfortunately, This footprint help hackers to identify your CMS/platform that makes it easy for them to tryout their best attacking method for your platform. There’s a couple of reasons user wants to hide or even completely remove the meta generator tag from their site’s source code that is generated by Drupal.

Here in this article, I’ll show you how to completely remove meta generator tag from your Drupal site’s source code.

Method 1: Using Drupal Contributed module (Recommended for Beginners)

There’s some module available on Drupal’s module project that will help you in removing or hiding Drupal meta generator tag from your site’s source code. There’s a module named Remove Generator META tag(https://www.drupal.org/project/remove_generator) is pretty good for this task.

This module coded only for this job and you don’t even need to do anything with this module. All you have to do is, Install and activate Remove Generator META tag on your drupal installation and the meta generator will gone.

You can also restore the meta generator tag by disabling this module. The same can also be done using drupal Metatag module (may have already installed). If you already have Metatag module installed, I recommend you to use this instead any other module. To remove drupal meta generator using Metatag module, follow the instructions below:

Step 1: Go to Configuration > Search and metadata > Metatag

Step 2: Click on Override/Edit operation for Global type

Step 3: Now click on the ADVANCED TAGS to expand settings then empty the Generator field content

Click on the Save button to apply the setting. Now the Meta generator removed from your Drupal installation.