How To Remove Drupal 7 Generator Meta Tag

  • follow us in feedly
Published March 4, 2013 by Brad Knutson
Drupal Meta Generator

Some Drupal 7 developers may have noticed a pesky meta tag that is displayed in the head section of their source code.

<meta name="generator" content="Drupal 7 (" />

This doesn’t really result in any negative effects, SEO or otherwise, but you still may want to remove it. Perhaps you want to lower the chance that spammers or hackers could identify that you are using Drupal 7. Maybe you just want to clean up the head section of your source code.

Whatever your reasons are, there is a way to remove the line of code. We could modify the core Drupal files and manually remove this line of code, but editing core Drupal is a no-no.

So let’s not edit core Drupal files. To remove the line of code from the head of your website, add the below code to your theme’s template.php file.

function YOURTHEME_html_head_alter(&$head_elements) {
The following two tabs change content below.
Founder at Inbounderish
Brad Knutson is a Web Developer in the Twin Cities area of Minnesota. He has experience working with WordPress and Drupal, and also has an interest in SEO and Inbound Marketing.

Keep Up-to-Date



See a complete list of topics discussed in blog posts here.

Check These Out

Get 2 Weeks Free! Sign Up Today! Premium Managed WordPress Hosting Genesis Framework for WordPress SEO is complex. Tools should be simple. Thesis Theme for WordPress:  Options Galore and a Helpful Support Community

Share Your Thoughts

Your email address will not be shown.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">