Drupal 6 Tutorial – SEO With Page Titles

As promised in my previous Drupal SEO tutorial, part 2 of the series has arrived! Today we will be talking about the importance of page titles for SEO, and how to set them up properly for Drupal 6 by using the Page Title module.

What page titles are and why do you want to change them

Whenever you browse to a website, if you look at the top of the browser window you will see a title. This is called the page title and you can find it in your HTML file under the <head> tag, inside <title>. Everyone is probably aware of this, but the really important part is this: The page title that you set in that tag is what shows up in google search results. So if someone searches google (or any other search engine) for evil monkey, and I have a page called Evil Monkey 101 – Chewbacca goes to Holywood!” that’s exactly how it will show up in the results. Thus, your page title is your first interaction with your visitor, and will probably determine whether he will click on the link or not. That is why we need to take full control of our page titles and turn them into useful and meaningful phrases.

1Taking control of the page titles in Drupal

Yep, you guessed it, we will need a module for this. And the name of this module is none other than… Page Title. You need to download it right here, and then upload it to your Drupal installation inside the /sites/all/modules folder, then go to Administer > Site Building > Modules, and under the Other category enable Page Title. You will also need the Token module for this to work, and if you don’t already have it you can find it here.

After that, you can manage the Page Title module settings at Administer > Content Management > Page Titles. Once there, you will be able to set a bunch of presets for your titles, depending on content type or taxonomy. This is where the Token module comes in handy, because it allows you to use a set of replaceable patterns. If you click on the Available Tokens List you will see a big list of variables. You can use any of these variables in your title patterns and they will automatically be replaced with the correct text. For example, if I use the token [nid], that will be replaced with the Node ID of the current node that I am viewing.

The Default field is mandatory. Let’s say that its value is [page-title] – [site-name], and that my site’s name is Chewbacca goes to Holywood!”. If I browse to a node called Chewy”, then the title at the top of the browser will be Chewy – Chewbacca goes to Holywood!”. Why does it do that? Because Drupal sets the page title equal to the node title by default. After that, the Page Title module steps in and appends the - Chewbacca goes to Holywood!”. But you can change how Drupal handles things in the remaining fields on the Page Title options page. You can set a specific preset to a specific content type, to a specific taxonomy vocabulary, or to the user profile.

2So what are the best titles for SEO?

Good question. People say a lot of things. Some say stuff them with keywords, others say keep them as descriptive as possible. I will tell you what I think and what has worked for me in the past. The problem with many websites is that usually the title is exactly the same as the node title, which is usually (or should be anyway) represented by a <h1> tag. Now if you think about it for a second, and think about how google works and how it has evolved over the past years, it doesn’t take much to realize that spamming keywords won’t do you any good.

First of all, you will need to have a meaningful title that will grab attention, but at the same time is deeply connected to the content on the specific page. Otherwise, even if people get to your site, they will leave in a matter of seconds. Secondly, the node title (and thus the <h1> tag) will have to be different (by using synonyms) and in some cases, even more descriptive. For example, the node title for this tutorial is Drupal 6 tutorial – SEO with page titles”, and it clearly describes what this page is all about. On the other hand, the page title is “How to optimize Drupal 6 page titles for search engines. Why is that? Well I have simply replaced the word “SEO” with “optimize for search engines” to add in a few extra keywords. In addition to that, the words “How to” are widely used in searches when people are looking for tutorials, or simply answers to questions. I still kept “Drupal 6” and “page titles” though, as this is what this tutorial is actually about.

3Setting custom titles for specific pages

If you want to take the approach described above, you will need even more control on your titles. On the Page Titles options page, you will see a column called Show Field. It places a checkbox next to all the content types and vocabularies that you have. If you tick that box, next time you edit a node of that content type, under the Title, you will get a new field called Page Title. Change that to your custom title and you’re good to go! But don’t forget, if in the Default field you had something like [page-title] – [site-name], then the site name will be added after your custom title. It is up to you if you want to keep or remove this.

4Conclusion and best practices

Page titles play an incredible role in on-site SEO, but many people often underestimate the little text at the top of the browser that nobody cares about”. I hope that at least now, you are not one of them any more. If so, there are two more things that you need to remember when writing your titles:

  1. Most search engines use a maximum of 60 characters per title, so for the extra zealous ones: keep it short.
  2. Be careful with duplicate titles. Google doesn’t like duplicate content, so make sure that you double check your titles and that they are all unique.

That’s it for today, I hope that you’ve enjoyed this tutorial, and if you have anything to add about Drupal, SEO, Page Titles or the philosophy of life, you are more then welcome. Next time we will be talking about descriptions and keywords, so stay tuned!

Alex Petrisor - Founder and maintainer of Padizine.com. He is currently studying creative advertising at Bucks New Univeristy, but he also takes freelance jobs as a graphic designer / web developer whenever he gets the chance. Learn more about him here.

4 Comments


  1. Nicholas Thompson
    Feb 12, 2010

    Thanks for the review and well done on explaining the topic in a very easy to understand way. :)


    • Alex
      Feb 12, 2010

      You’re welcome Nicholas. Keep up the good work with the module :D


  2. Jordan
    Feb 26, 2010

    Why is your site run on Wordpress if you right about how awesome Drupal is? Just a thought


    • Alex
      Feb 26, 2010

      I don’t write about how awesome Drupal is, I just write tutorials for it. In fact it is quite awesome. Wordpress is quite awesome as well. It all depends on what you need it for, and for a blog I will always choose Wordpress. Who knows, maybe I will write Wordpress tutorials in the future as well.

      As for my main website, I decided to use Wordpress as I’ve been using it quite a bit recently and I wanted to incorporate the site and the blog together. You will see this in effect really soon.

Leave a Reply