Thursday 17 November 2011

SEO in drupal part 2

,

2. Enable the Path Module

The Path module is a core module with Drupal 6, which means that it is part of the normal software release. This module takes you beyond clean URLs by providing the ability to create arbitrary URLs for any Drupal content item. With the Path module enabled you are free to optimize these URLs both for humans and for search engines. To take advantage of this module you just need to enable it via the Drupal admin system. This is done by logging into Drupal as an administrator, navigating to the Administer > Site building > Modules section. Here you will see a list of installed modules. Scroll down to locate the Path module, check the box to enable it and then click to save the configuration changes at the bottom of the page. After you have enabled the Path module, Drupal's content editing screens will have a new section where you can enter an alias for the content item. Keep in mind that content aliases are very flexible in terms of format, but that they must be unique in the system.
D6-SEO-Path-Field.jpg

3. Install and Enable the Pathauto Module

The Pathauto module builds upon the aliasing capabilities of the Path module, but goes a step further by enabling the automatic creation of aliases. Pathauto has extensive configuration options (beyond the scope of this article) which allow you to use various keywords or data — called tokens in the Drupal context — to construct URLs for different content types. The first step is to download, install and enable the Pathauto module. Pathauto relies upon both the Path and Token modules. So you must install and/or enable both those modules before you will be able to enable the Pathauto module.

Note:
If you're unfamiliar with installing Drupal modules, it's actually quite easy. You navigate to the module's homepage, download the latest "Released" build for your version of Drupal, decompress the archive and copy the module's folder into the "modules" directory which sits at the root of your Drupal install. Once you've put the new directory and files in place, as an administrator navigate to Administer > Site building > Modules in the Drupal admin system. You will see a list of installed modules. Scroll down to locate the recently installed module, check the box to enable it and then click to save the configuration changes at the bottom of the page.
D6-SEO-Pathauto-Config-Sections.jpg
Drupal 6 — Pathauto Configuration Sections

For the moment, leave the General settings and Punctuation settings in their default state. Depending on what Drupal functionality you are presently using, review the other sections and make changes as you see fit. Certainly all site administrators should review the Node path settings area as the settings here will effect the URLs for all basic content types.
Hint: Take your time with these settings. Review other sites similar to yours and map out how you want the URLs to look for each content type you will publish. Note:
The Pathauto module depends on the Token module. Both of these modules are "contributed modules" in Drupal 6. This picture is changing with Drupal 7 though — the Token module is being moved into the system's core. Pathauto may also move into core, but this was not clear at the time this article was written.

4. Install and Enable the Global Redirect Module

The Global Redirect module is a contributed module that must be downloaded, installed and enabled. It primarily addresses one important SEO concern: canonicalization of URLs.

Canonicalization Issues

Canonicalization issues are a fancy way of saying that it's a SEO problem if there is more than one URL for a given piece of content in your website. I like to bring up the movie The Highlander and the "there can only be one" line that Christopher Lambert made famous.
Canonicalization can kind of be thought about like this. The problem is there can be more than one when it comes to URLs — especially when you start implementing fancy aliasing like we've done above.
The search engines however won't allow there to be more than one URL for an item in your site. So they have to make a decision about which is the correct one. And generally speaking, it's better if you, the site owner, take control of this decision. That's where canonicalization control comes in.
The Global Redirect module helps quite a lot in this area. It performs the following tasks:
  • Removes trailing slashes from URLs (“/”) when the slash is not part of the canonical URL.
  • Permanently redirects any requests that refer to the homepage, but use something other than the canonical URL for the homepage address.
  • Permanently redirects any requests for content using the non-clean URL format (when the Clean URLs feature is enabled).
  • Removes unnecessary trailing zeros (“0”) when URLs address content in a taxonomy hierarchy.
  • Permanently redirects any requests for content where the case of the requested URL does not match the case of the canonical URL.
To enable this automatic functionality, download, install and enable the latest released version of the Global Redirect module. See our instructions above if you need guidance here. Once it is installed and enabled you are done with this configuration item.
Note - 1:
To handle homepage canonicalization issues (which you should), you will need to create a rewrite rule for your web server. The decision must be made whether or not you want the host name — typically 'www' — to be part of your canonical homepage URL.
For example, we had to chose to use either http://www.cmswire.com/ or http://cmswire.com/ as our homepage URL. We have chosen to use http://www.cmswire.com/ for our homepage and if you try the other one you will be permanently redirected to the URL with 'www' in it.
Tip: When implementing the canonical homepage rewrite rule, the rule should be placed above your other rewrite rules. This redirect should happen first.
In Apache environments, simply uncomment the appropriate lines from the .htaccess file that ships with Drupal. In IIS environments you will either need to use the URL Rewrite add-on or another rewrite tool if you are not using IIS 7.
If you are using IIS 7 and the URL Rewrite add-on, you can use a rule set like the below to achieve a canonical homepage URL with the 'www':
<rule name="CanonicalHomepageURL_1" enabled="false" stopProcessing="true">
    <match url="^(.*)$" />
    <conditions>
        <add input="{HTTP_HOST}" negate="true" pattern="^www\.(.*)$" />
    </conditions>
    <action type="Redirect" url="http://www.{HTTP_HOST}/{R:1}" />
</rule>
Note - 2:
In February 2009 Google, Yahoo! and Microsoft agreed on a standard for specifying the canonical link for a webpage. You can now specify the correct URL for a page by using a small bit of HTML code, placed in the head section of an HTML document. An example of this is as follows:
<link rel="canonical" href="http://www.example.com/" />

5. Install and Enable the Path Redirect Module

The Path Redirect module is a contributed module that must be downloaded, installed and enabled. For our purposes here, it primarily addresses one important SEO concern: URL change management. It is also a handy utility that allows you to create redirects from any alias to any other alias.

URL Change Management

This particular problem should not need much explaining. For various reasons (e.g., if a title is changed and the title is a token used in the URL) a URL may change over time. The ideal situation is that once a URL changes, the system knows about this and is able to gracefully redirect requests for the old URL to the new URL. And more specifically, the ideal case is that the system uses a 301 Redirect to accomplish this task.

from:
http://www.cmswire.com/cms/web-cms/drupal-seo-5-muhttp://www.cmswire.com/cms/web-cms/drupal-seo-5-must-do-configurations-005044.php?pageNum=2st-do-configurations-005044.php?pageNum=2

0 comments to “SEO in drupal part 2”

Post a Comment

 

Drupal SEO Copyright © 2011 | Template design by O Pregador | Powered by Blogger Templates