Home Web Development Drupal 6 Search Engine Optimization

Drupal 6 Search Engine Optimization

By Ben Finklea
books-svg-icon Book
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
$10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
BUY NOW $10 p/m for first 3 months. $15.99 p/m after that. Cancel Anytime!
eBook $28.99 $19.99
Print $48.99
Subscription $15.99 $10 p/m for three months
What do you get with a Packt Subscription?
This book & 7000+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook + Subscription?
Download this book in EPUB and PDF formats, plus a monthly download credit
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with a Packt Subscription?
This book & 6500+ ebooks & video courses on 1000+ technologies
60+ curated reading lists for various learning paths
50+ new titles added every month on new and emerging tech
Early Access to eBooks as they are being written
Personalised content suggestions
Customised display settings for better reading experience
50+ new titles added every month on new and emerging tech
Playlists, Notes and Bookmarks to easily manage your learning
Mobile App with offline access
What do you get with eBook?
Download this book in EPUB and PDF formats
Access this title in our online reader
DRM FREE - Read whenever, wherever and however you want
Online reader with customised display settings for better reading experience
What do you get with video?
Download this video in MP4 format
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with video?
Stream this video
Access this title in our online reader
DRM FREE - Watch whenever, wherever and however you want
Online reader with customised display settings for better learning experience
What do you get with Audiobook?
Download a zip folder consisting of audio files (in MP3 Format) along with supplementary PDF
What do you get with Exam Trainer?
Flashcards, Mock exams, Exam Tips, Practice Questions
Access these resources with our interactive certification platform
Mobile compatible-Practice whenever, wherever, however you want
  1. Free Chapter
    The Tools You'll Need
About this book
The earlier a site appears in the search results list, the more visitors it will receive from the search engine. Despite several advantages, many Drupal sites suffer with poor search engine standings. Perhaps you are aware of the importance of SEO for increasing traffic to your site, but do you know how to apply it to your Drupal site? Here comes the first book about search engine optimization for Drupal sites. This practical, step-by-step guide takes the mystery out of Drupal search engine optimization (SEO) by showing you the tricks of today's top marketing pros to achieve top ranking in the search engines. This isn't a book of Drupal SEO theory ñ it's a practical guide showing you which modules to install, which settings to use, and dozens of the most closely guarded "tricks of the trade" to get your web site optimized, higher in the search engines, and more profitable. With this book and basic Drupal 6 knowledge ñ how to log in, create content, and install modules ñ you can build a perfectly search engine optimized web site. Each chapter uses easy, step-by-step instructions to walk you through the Drupal SEO modules, configurations, and content you will need to increase traffic on your web site. You start by reviewing the modules and tools that you should use to optimize your site, how to set up your analytics, and so on. Each subsequent chapter gives detailed instructions on implementing these features in Drupal. Later chapters cover topics like site organization, A/B testing, and automatic content tagging to maximize SEO and increase the conversion rate of your web site. When you have completed the book, you will have implemented the changes to your site required to rank well in the search engines. If you want to maximize the return on investment of your Drupal 6 web site and gain a significant advantage over competitors who are not using Drupal, then this book is for you. Imagine how great you'll feel when your site is optimized to increase the number of visitors and convert them into paying customers.
Publication date:
September 2009
Publisher
Packt
Pages
280
ISBN
9781847198228

 

Chapter 1. The Tools You'll Need

Congratulations! You're about to embark on a fun and interesting journey into the world of online marketing. Whether you're trying to sell more products, generate leads, or get more pageviews on your sponsors ads, Search Engine Optimization (SEO) will take you where you want to go.

And, you're using Drupal 6! You've picked a great platform for building your web site. It's widely held that Drupal is one of the best choices if you want to rank well in the search engines. I personally believe that it's hands-down the best possible platform for SEO. I've seen clients triple their traffic within a few weeks of switching from a lesser platform. Believe it—Drupal is the best! But, you already knew that, didn't you? In this chapter, we're going to dive right in and cover some of the top tips for Drupal SEO:

  • Drupal—which version you should use

  • How to install 99% of modules

  • The essential SEO modules that you'll need for your Drupal site

  • Installing and using the SEO Checklist module

  • Setting up a Google account

  • Installing Google analytics and Webmaster Tools on your site

  • Some great paid tools to help you with your SEO

Note

Helpful web sites:

There are some great resources online to help you along:

www.DrupalSEObook.com: The web site of this book. Visit for additional tips, updates, module suggestions, and to discuss Drupal SEO. The author often participates here so it's a great place to ask questions.

groups.drupal.org/search-engine-optimization: The Drupal SEO group on www.Drupal.org.

tips.webdesign10.com/drupal-seo: Another resource for Drupal SEO tips.

The right tools make the project go smoothly. When you decide to SEO your Drupal 6 web site, you'll need the following:

Drupal 6

You can download Drupal 6 from two sources:

  • Drupal.org: This is where you can get the latest release of the open-source Drupal 6.

  • Acquia.com: Acquia is a company co-founded by Dries Buytart (the founder of Drupal) and Jay Batson. Acquia has produced a corporate version of Drupal, creatively called Acquia Drupal. Acquia Drupal has some of the better modules pre-installed and provides some great extra services like uptime monitoring, version updates, and advanced support to your installation and modules. Downloading and installing it is free but the services do cost a bit extra—starting at a few hundred dollars per year. That's well worth the extras you get.

Note

Are you running a corporate site and you're not quite up to speed on Drupal? Consider signing up for Acquia's support services. Acquia Network subscriptions provide commercial-grade support and network services for all Drupal 6.x web sites (not just Acquia Drupal) to help you implement Drupal with confidence. Visit http://acquia.com/ for more information.

 

Drupal 6


You can download Drupal 6 from two sources:

  • Drupal.org: This is where you can get the latest release of the open-source Drupal 6.

  • Acquia.com: Acquia is a company co-founded by Dries Buytart (the founder of Drupal) and Jay Batson. Acquia has produced a corporate version of Drupal, creatively called Acquia Drupal. Acquia Drupal has some of the better modules pre-installed and provides some great extra services like uptime monitoring, version updates, and advanced support to your installation and modules. Downloading and installing it is free but the services do cost a bit extra—starting at a few hundred dollars per year. That's well worth the extras you get.

Note

Are you running a corporate site and you're not quite up to speed on Drupal? Consider signing up for Acquia's support services. Acquia Network subscriptions provide commercial-grade support and network services for all Drupal 6.x web sites (not just Acquia Drupal) to help you implement Drupal with confidence. Visit http://acquia.com/ for more information.

 

Modules


A module is a community-created plugin that enhances Drupal's core functionality. From XML sitemaps to better page titles, modules are crucial to the search engine optimization of any Drupal site. Installing modules is easy and once you know how to install one, you probably know how to install them all.

Note

For a complete explanation of installing modules, check out the following links: http://drupal.org/node/120641 and http://drupal.org/node/120642.

Installing 99% of Drupal modules:

In the upcoming chapters, you'll come across a lot of Drupal modules. You need to carry out the following steps in order install 99% of Drupal modules:

  1. 1. Download the module from http://drupal.org/project/Modules and extract it.

  2. 2. FTP to your Drupal site. Drop the extracted module folder into the sites/all/modules folder (if that directory is not there then create it).

  3. 3. Using your browser, visit http://www.yourDrupalsite.com/user and log in.

  4. 4. Now visit http://www.yourDrupalsite.com/admin/build/modules/. If you forget this URL, just go to the admin page and click the Modules link.

  5. 5. Select the checkbox next to the module that you just installed. If needed, also tic any sub-modules that you just installed.

  6. 6. Click on the Save Configuration button. In a couple of seconds, the newly selected module will install itself. Any errors will appear in red.

  7. 7. Go to http://www.yourDrupalsite.com/admin/user/permissions and set the permissions for that module so that different roles can use or administer the new functionality that the module has added (not required for all modules).

  8. 8. Go to http://www.yourDrupalsite.com/admin and you'll see links to customize the settings of your newly installed module.

Installing the remaining 1% Drupal modules

If the module isn't working, be sure to read the README.txt file that came with the module. Sometimes, there are extra steps required to fully install a module.

Note

Drush: The alternative to manual Drupal module installation

If you're comfortable with using the Unix command line, you should consider Drush. Drush is a module created by Moshe Weitzman that provides a command line shell and Unix scripting interface for Drupal. After you install it, you'll be able to use commands like drush dl modulename and drush enable modulename to install and enable modules. No trips to drupal.org and no admin screens so it's very fast.

Essential SEO modules

Now that you know how to install modules, there are several that you'll need in order to optimize your Drupal site.

What follows is a list of the non-core Drupal modules you'll use most often for SEO. (Non-core means not included in the base Drupal installation. However, something might be included in Acquia Drupal so check your Modules admin screen first!) We'll cover almost all of these in more detail later in the book. You can either download them all and install them on your site or grab them one at a time as you work on each SEO task. Either way, don't enable them until you're clear what they do and how to configure them. Sometimes, careful setup is required to get the optimal benefit from a module.

Optional SEO modules

There are a few more SEO modules which are optional. Let's have a look at them.

Non-SEO modules

There are so many good, helpful modules; it's hard to mention them all. Here are a few non-SEO modules that I consider to be a must for any site I'm working on.

  • Administration Menu: It makes it quick and easy to get to all the admin functions of your web site.

  • Backup and Migrate: It simplifies the task of backing up and restoring your Drupal database or migrating data from one Drupal site to another.

  • Devel: It makes it easy to generate a bunch of nodes, taxonomies, and users for testing purposes. It has other helpful functions as well.

  • Notify: It sends periodic emails with details of all changes to a site.

    • Use if you want to review all posts, forums, or comments posted to your site. Great for responding to comments as they happen.

  • Search 404: Instead of a file not found error if a page is missing, it does a search on the keywords in the URL to show possible matches.

Note

PHP memory limits and module installation

If you install a lot of modules in Drupal then you may come across the dreaded "White Screen of Death". It often occurs when you visit the Administer | Modules page; you'll see nothing but a white screen. This means that PHP—the language that Drupal is written in has run out of memory. There are several ways to increase the allotted memory. The easiest is to add the line php_value memory_limit 32M to your .htaccess file in the Drupal root. You can adjust this to 48M, 64M or even higher, but 32M typically works fine and conserves memory. Don't just max it out as that's the amount of memory that Drupal will use for each visitor and it adds up quickly, especially on shared servers. There are other options if this doesn't work. To find out more, visit http://drupal.org/node/31819.

 

Drupal SEO Checklist module


The Drupal SEO Checklist module is the first one that I install when I begin working on a site. Carry out the following steps to download and install the Drupal SEO Checklist module:

  1. 1. Download the SEO Checklist module from the following link, http://drupal.org/project/seo_checklist and install it just like a normal Drupal module. Refer to the earlier part of this chapter for step-by-step module installation instructions.

  2. 2. Visit the following link, http://www.yourDrupalsite.com/admin/settings/seochecklist or go to your admin screen and click on Administer | Site configuration | SEO Checklist link. Then, you'll be able to see the SEO Checklist admin page screen, as shown in the following screenshot:

  1. 3. Find out which modules you already have installed by clicking on the Check for already Installed Modules button. It will check off any modules you've already installed.

  2. 4. Go through each section of the SEO Checklist admin page installing each module or completing each task. Be sure to check off each item as you go and click the Save button.

While it's not necessary to install this module, it will save you hours of research and hunting down the modules you need for proper SEO.

 

Google Account


Google is the undisputed leader in search. One way that they stay on top is by providing tools to help web site owners manage their sites. Among other things, they've created Google Analytics, Google Webmaster Tools, and Google Site Optimizer—all three essential to a good SEO campaign. Oh! And they're free. To access all this SEO goodness, you'll need to set up a Google Account.

Note

Create an account for each company

Note

If you're doing SEO for more than one company, keep them all separate. Set up a Google Account for yourself plus one for each client. If a client has more than one web site, put them all under that client's account. With many of Google's services, like Analytics, you can assign yourself as administrator of each account so you can access everything with one login. Thanks, Google!

Setting up a Google Account

Carry out the following steps to set up a Google account:

  1. 1. Go to https://www.google.com/accounts/NewAccount.

  2. 2. Fill out your information. Be sure to use a valid email address.

  3. 3. Read the Terms of Service and then click the I accept. Create my account. button.

  4. 4. You'll see a screen that says, In order to verify that the email address associated with your account is correct, we have sent an email message to yourname@yourDrupalsite.com. To activate your Google account, please access your email and click on the link provided.

  5. 5. You will receive an email with the subject Google Email Verification and with a link in the body to verify your account. Click on the link.

  6. 6. You should see the message, Email Address Verified.

Be sure to save your login in a safe place. You'll need it each time you access one of Google's services.

 

Analytics


In bygone years, people tracked visitors on their web site using server logs. While this is still accepted practice, it's difficult and time consuming to access enormous log files to figure out what's going on with your site. Several years ago, companies started releasing tools to make that process easier. They called their products Analytics.

Analytics packages help you track visitors on your web site—where they came from, what they do while on your site, where they are in the world, and if they bought your products or filled out your forms. It works by installing a small piece of JavaScript code in the footer of your site that pings a server every time a visitor loads a page. You could do this yourself but you'd have to process, filter, and store all that data on your own. A good analytics program is easier, faster, more robust, and in many cases free.

A good analytics program will help you learn which online marketing initiatives are cost effective and see how visitors interact with your site. With that information, you can make informed design improvements, drive targeted traffic, and increase your conversions and profits. Analytics won't make the tough decisions for you—they will give you the data you need to make those decisions.

Note

A few common question that analytics can help answer are as follows:

How many unique visitors did I get over the last month?

What is my conversion rate?

How can I improve the visitor experience on my web site?

Why isn't anyone buying my product?

Are the negative comments on my blog affecting my sales?

How many sales came from Adwords vs. my SEO campaign?

Are visitors engaged by my front page or turned off?

It's important to install analytics as soon as possible, so that you can start to accumulate data about your site visitors. The more data you have, the better the reports and decisions you will be able to make. Depending on your site traffic, it may take weeks or months before you have enough meaningful data to put to use improving your site.

While you only need one analytics program, two will allow you to compare results and be sure that your stats are relatively in sync with each other. Different programs track data in different ways. If they're inconsistent then it could reveal a problem that needs to be fixed on your site.

Google Analytics

There are dozens of analytics packages out there and it's hard to beat Google's free suite which is simply called Google Analytics. It's easy to install, quick to get started, and has easy-to-read charts. Yet, it boasts very powerful features like advanced segmentation, customizable reporting, and industry benchmarking.

When using Google Analytics with Drupal, it's even better. It's easy to install, configure and test thanks to the Google Analytics module. The Google Analytics module was first created by Mike Carter and is now maintained by Alexander Hass. Thank you, gentlemen!

Creating a Google Analytics account and installing it on your Drupal site

To create a Google Analytics account and install it on your Drupal site, carry out the following steps:

  1. 1. Visit http://www.google.com/analytics and click the Sign Up Now link.

  2. 2. Log in using your Google account.

  3. 3. Fill out your web site information.

Web site URL:

Put the full URL of your site. If you use the www, then include it.

Account Name:

Google automatically enters the URL but that is often not the right choice. If you will ever have more than one web site that you track with Google Analytics then use an account name that is a bit more descriptive, such as your organization's name or even your name.

Time Zone Country:

Enter the country that your web site serves. For example, if your company serves Texas but you host your site in the UK, put United States as the country.

Time Zone:

Time zone will influence the dates and times that the analytics will report the traffic data from your site. You'll probably select the time zone that you work or live in.

  1. 4. Click on Continue and fill in your contact information.

  2. 5. Click on Continue. Here you'll read and agree to the User Agreement. You'll also notice that you're opted in to anonymously share your Google Analytics data. According to Google, Shared data will be used to improve the services we provide you and will help create more powerful features for you to choose from. There are two levels of sharing.

With other Google products only

It will only share your data with Google. This is more private and still gives you access to the enhanced features that may come out in the future.

Anonymously with Google and others

It will share your data more widely. Any identifying information about your site is removed and then it's mixed in with thousands of other sites' data. If you opt in at this level then you'll be able to benchmark your site with other sites in your industry. This can be helpful to see how you're doing compared to your competition.

  1. 6. Finally, click on Create New Account. You're done!

  2. 7. Now install the Google Analytics module. It installs normally like any other Drupal module. See earlier in this chapter for step-by-step module installation instructions. Here's the short version: Download the module, drop it into your /sites/all/modules folder, go to /admin/build/modules, and turn it on.

  1. 8. To configure the module, point your browser to www.yourDrupalsite.com/admin/settings/googleanalytics at the top of the page and you will be able see a screen similar to the following screenshot:

  1. 9. Go back to your Google Analytics account and you should see a number next to your URL name that starts with UA-, as shown in the following screenshot:

  1. 10. Copy and paste your site's UA number into your Drupal site. (Don't use mine! Get your own!) If you don't see this, click the Analytics Settings link, located at the upper left corner.

  2. 11. Under User Specific Tracking Settings, make sure that Users cannot control whether they are tracked or not option is selected. This makes sure that you're tracking all your visitors and they can't turn off the tracking.

  3. 12. Under Role specific tracking settings, you will have a few options. For most sites, you want to check everything except the authenticated user option, as shown in the following screenshot:

    Note

    Role specific tracking settings is one of the best things about the Google Analytics module. One of the common problems with Google Analytics is that it tracks everything that happens on your site—even your own activity. So, if you visit your site a lot (which you probably should) then you'll skew your Analytics. Telling Drupal to not track admin users will dynamically show or not show Google's tracking code depending on if a user is the site admin. There are many uses for this. Say you don't want to track any of your company's users. Just give them a custom account type (like staff) and deselect the checkbox in the Google Analytics module. Clean, easy, and works like a champ!

  4. 13. Except for advanced needs, the rest of the settings should be left as the defaults. Click on Save configuration. You're done!

Note

Common mistake when configuring the Google Analytics module

Note

Under Advanced settings, there is a field called Custom JavaScript Code. DO NOT put your Google code there. If you've put your Google account information at the top of the admin page then the module will write all the code automatically. The Custom JavaScript Code field is for special code snippets that are added to the tracking code (refer to drupal.org/node/248699). If you put the full code there then you will track every user on your site twice. Not good!

Google's help pages say 'Once you've correctly installed your tracking code, you should allow up to 24 hours for data to appear in your account'. Check back tomorrow and you should see some data. It starts to get really interesting when you've accumulated several months worth of data. Be patient—it's well worth the wait.

Yahoo! Analytics

Yahoo! recently launched their own analytics package called Yahoo! Analytics. It's getting good reviews as an alternative to Google Analytics. As of this writing it's only available to Yahoo!'s search and display advertisers. For more information visit the following link: http://web.analytics.yahoo.com/.

 

Google Webmaster Tools


If you've got a site that shows up in Google then you need a Google Webmaster Tools account. The Google Webmaster Tools provide you with detailed reports about your pages' visibility on Google. It's one of the most direct ways that you can communicate with Google about your site. It allows you to upload an XML sitemap, see if there are any problems with your site and fix them. It even lets you control the Google spider so that it doesn't drag your site down with constant visits.

To use the tool, you need to verify your site. Fortunately, there is a great module called the Site verification module that helps you verify your site with the search engines. It was created and is maintained by Dave Reid. Thanks, Dave! You'll always be verified in my book!

Verify your site with Google

Carry out the following steps to verify your site with Google:

  1. 1. Go to http://www.google.com/webmasters/tools and sign in using your Google account.

  2. 2. Type the URL of your web site in the empty box, named Dashboard, and click on Add Site. Your site is now added and it needs to be verified.

  1. 3. Click on the Verify link, located next to your site name, as shown in the following screenshot:

  1. 4. Under the Choose verification method… option, select Upload an HTML file.

Note

You could also chose Add a meta tag and the Site verification module can handle that as well. Either way works equally well.

  1. 5. Copy the filename provided, as shown in the following screenshot:

  1. 6. Now, install the Site verification module. Refer to the earlier part of this chapter for the step-by-step module installation instructions.

  2. 7. Go to http://www.yourDrupalsite.com/admin/build/site-verify/add/google. You'll see a screen similar to the following screenshot:

  1. 8. In the Verification file field, paste in the filename that you got from Google and click on the Save button.

  2. 9. Test the URL. In your browser, open the following link: http://www.yourDrupalsite.com/<nameofspecialGooglefile.html>. You'll be able to see a screen similar to the following screenshot:

  1. 10. Go back to Google Webmaster Tools and click on the Verify button. In a few seconds, you should see the success message, as shown in the following screenshot:

Google Webmaster Tools settings

Now that your site is verified with Google, you can take advantage of all the great features that Google Webmaster Tools has to offer. Here are a few to which you should pay particular attention.

Preferred domain

Depending on how you set up your .htaccess file (refer to Chapter 7, robots.txt, .htaccess, and W3C Validation), you can access your Drupal site using a www or not. For example, http://www.yourDrupalsite.com/ or http://yourDrupalsite.com/ both will point to the front page of your site. This is not ideal because Google may treat those two URLs as two different pages and assume they contain totally different content. You'd actually be competing with yourself in Google and that's not a good thing.

Fortunately, you can fix this problem using the preferred domain setting. The preferred domain is the one that you would like used to index your site's pages and to have show up in Google. If you specify your preferred domain as http://www.yourDrupalsite.com and Google finds a link to your site that is formatted as http://yourDrupalsite.com, they'll treat that link as if it was http://www.yourDrupalsite.com. In addition, Google will take your preference into account when displaying URLs in the search results.

Set a preferred domain in Google Webmaster Tools

To set a preferred domain in Google Webmaster Tools carry out the following steps:

  1. 1. On the Webmaster Tools Dashboard, click the URL for your Drupal site.

  2. 2. Click on Settings, present on the left hand menu.

  3. 3. In the Preferred domain section, select the option of your choice, and then click on Save, as shown in the following screenshot:

Note

Does it matter, which one?

Note

No, not really. You can choose either www or non-www— there is no advantage between the two. However, you should pick one. If you don't specify Google may split the value of the incoming links to your site between the two options, which will lower your overall ranking.

Crawl rate

If you are on a slow server, you may want to consider asking Google to be a bit more considerate about how much data it grabs from your site at a time. This is called the crawl rate. It doesn't effect how often Google visits, just how many pages they ask for at a time. It can be very helpful if you're experiencing a server slowdown.

Setting the crawl rate in Google Webmaster Tools

Carry out the following steps in order to set the crawl rate in Google Webmaster Tools:

  1. 1. On the Webmaster Tools Dashboard, click the URL for your Drupal site.

  2. 2. Click Settings from the left hand menu.

  3. 3. In the Crawl rate section, select Set custom crawl rate.

  4. 4. Adjust the slider to change the crawl rate, as shown in the following screenshot:

  1. 5. Finally, click on Save.

 

Understanding search engine crawlers


Did you ever wonder how all those pages got into the search engines in the first place? There's a magic search engine genie that flies from server to server waving a magic wand; not really but close. Actually, there is a computer program called a crawler (or sometimes a spider or robot or'bot) that lives on the search engine's servers. Its job is to surf the Web and save anything it finds. It starts by visiting sites that it already knows about and after that, follows any links that it finds along the way. At each site that it visits, it grabs all the HTML code from every single page it can find and saves that on its own servers.

Later, an indexing server will take that HTML code, examine it, parse it, filter it, analyze it, and some other secret stuff (a lot like waving that magic wand). Finally, your site is saved into the search engine's index. Now, it's finally ready to be served up as a search result. Total time elapsed? About two minutes.

One important thing to note here is that search engine crawlers follow the same links that you do. That means that if you can't click the link, then there's a good chance that the crawler can't click the link either. Fortunately Google does a great job of following JavaScript links, but if you're using JavaScript for your Drupal navigation menus then chances are good that other search engines can't see much past your front page. That's where some creative techniques can really come in handy. Breadcrumbs to show navigation or an XML sitemap (refer to Chapter 5, Sitemaps) can help the crawler find out where to go next. That's why those tools are sometimes called spider food.

 

Paid tools


Here are a handful of useful tools that are not quite free. They are useful and have a place in every good SEO bag of tricks.

CrazyEgg

Eye-tracking studies show you where people are looking while they're on your web site. Dries Buytart, the founder of Drupal, showed one during his 2008 State of Drupal address at the Boston DrupalCon. The heat map shows where the users look in the first five seconds after landing on Drupal's main administration page. The red X's show where the users clicked, as shown in the following screenshot:

With CrazyEgg, you can do something similar on your own web site. Although it can't track your visitors' eye movements, it can show a heat map that shows you where your visitors click. This is another one of those tools that you should install and let run for a few weeks or months so that you can collect some useful data.

The Crazy Egg tool costs $9 per month. To try it yourself, visit their website at www.CrazyEgg.com.

Mint

Mint is an extensible, self-hosted web site analytics program. Visits, referrers, popular pages, and searches can all be taken in at a glance on Mint's flexible dashboard. It's not as powerful as Google Analytics but it's very simple to use and hosted right on your own site, so it's fast and timely. The following screenshot shows how the Mint tool works:

Mint costs $30 per site. To try it yourself, visit their website at www.haveamint.com.

 

Other Great Tools


There are several other great free tools you can use. Let's go ahead and have a look at them.

Installing two browsers

Why would I possibly need two browsers? One of the great features of Drupal is that it knows if you're logged in and will show different screens when you're the admin of the site than it would if you're an anonymous visitor. For example, you may have noticed an Edit link on each node of your site when you're logged in as the admin.

This little trick is cookie-based. Browsers don't share cookies so you can be logged in to your site on Firefox and show up as an anonymous user in Safari. With two browsers installed, you can make changes as the admin on one browser and see those changes as an anonymous visitor on the other.

Google Toolbar

Another helpful tool is the Google Toolbar. Google Toolbar gives you some very helpful tools like a Google search box and the Google Pagerank indicator. Visit any page on the web and the toolbar will tell you the Pagerank of that page. Currently, the Google Toolbar only supports Firefox and Internet Explorer. The following screenshot shows the Google Toolbar for Mozilla Firefox:

PageRank

PageRank is a very important factor which needs to be taken into consideration for the Search Engine Optimization of your site.

What is it?

PageRank is a number between zero and ten that expresses Google's view of the importance of a web page. Important pages receive higher PageRank and are more likely to appear at the top of search results. Links pass PageRank value from one page to another. It's sometimes called link juice. A link from an important site passes more link juice than a link from a lesser site.

How do I get more?

You can get more PageRank simply by having pages with PageRank link to you. Each page that links to your site, passes a little of its PageRank to your site. The more links you have and the higher the PageRank of the sites that link to you the more PageRank you get.

SEO for Firefox plugin

Assuming that you're using Firefox, adding the SEO for Firefox plugin to your browser will add a plethora of great SEO-related tools to use right in your browser. When you view search results in Google, this nifty plugin overlays useful data about each site in the results. For example, it will show you the PageRank, domain age, and how many backlinks it has, as well as how many links from popular web sites like dmoz, twitter, del.icio.us, and Digg. This can be invaluable when you're doing keyword research (refer to Chapter 2, Keyword Research). Download it from the following link: http://budURL.com/seoforfirefox.

Yahoo! site explorer

Google isn't the only search engine that offers some great tools. Yahoo! is one of the few search engines that will provide you with a list of all the links you have coming into your site. Just point your browser at http://siteexplorer.search.yahoo.com/ and put in your URL. You can even add a badge to your site that tells you how many in links you have, as shown in the following screenshot:

 

Summary


In this chapter, we covered all the tools you're going to need for Drupal SEO. From Drupal and all the great modules available for SEO to setting up a Google account, this chapter is the foundational to the rest of this book. At this point, you should have:

  • A Drupal site set up and installed

  • A good grasp of how to install a Drupal module

  • The SEO Checklist module installed

  • A Google account

  • A Google Analytics account

  • A Google Webmaster Tools account

  • A preferred domain and crawl rate set in Google

  • Two browsers installed

  • The Google Toolbar and the SEO for Firefox plugin.

In the next chapter, we explore keyword research—the most fundamentally important part of your SEO campaign.

About the Author
  • Ben Finklea

    Ben Finklea is the founder and CEO of Drupal SEO firm Volacci Search Marketing. He is the creator of the Drupal SEO Checklist module and he contributes to other SEO-related modules in the Drupal community. Ben is an internationally-known consultant, speaker, and trainer on topics related to SEO, Drupal, and building successful high-tech businesses. He lives with his wife and sons near Austin, Texas

    Browse publications by this author
Drupal 6 Search Engine Optimization
Unlock this book and the full library FREE for 7 days
Start now