Archive for the ‘Drupal’ Category

Solve Duplicate URL Using Canonical Link Tag

Tuesday, February 17th, 2009

Everyone is aware that duplicate url/content causes a negative effect on search engine, worry no more because Google, Yahoo, and Microsoft already made an action to solve the issues. The three search engine company announced the support for the new link tag to clean up duplicate urls on sites that produces duplicate content.

Here an example on how canonical link tag works. If you have a blog post URL: http://www.eligio.org/kakashi-is-dead-naruto-shippuuden-mad-spoiler.html and you have a lot of comment on that topic, this produces duplicate url/content. See URL with comment http://www.eligio.org/kakashi-is-dead-naruto-shippuuden-mad-spoiler.html/comment-page-2#comments . Both URL produces duplicate content, so in order to prevent this, We use the new implemented link tag, this will be added under the HEAD tag.

Example Canonical Link Tag

<link rel="canonical" href="http://www.eligio.org/kakashi-is-dead-naruto-shippuuden-mad-spoiler.html"/>

The canonical link tag tell the search engine that the preferred location is specified in the link tag. This is the same function as when using 301/permanent redirect.

If you are using wordpress/drupal, Joost de Valk has already made canonical plug-in for WordPress and Drupal module.

To learn more about canonical link element you can visit Matts Cutts Blog.

Basic SEO Tips For Drupal

Tuesday, October 14th, 2008
  1. First thing you need to do is clean urls of your Drupal web site. To clean urls of your Drupal web site follow this. Login to your Drupal web site admin panel. Navigate to:
    Administer -> Site configuration -> Clean Urls -> Enable -> Save Configuration.
  2. Next thing you need is SEO friendly urls. Drupal has some great modules which let you rename your web sites urls to any thing you wish. First module is “path” module. The page module is installed with the Drupal installation. But it is not enabled by default. So enable the path module from Adminstrator -> Site building -> Modules.
    Path module is recommended only if you have few pages on your web site. Because every time to create a webpage, you need to manually assign a name for that web page. Suppose you have hundreds of webpages and everyday you create many pages, than renaming each page can be irritating. So, you need a module which can rename the webpage urls in some predefined SEO pattern. The Pathauto module automatically generates path aliases for various kinds of content (nodes, categories, users) without requiring the user to manually specify the path alias. The Pathauto module require “Path” module to be enabled. So, Enable Path and Pathauto module and do some simple settings of Pathauto modules in admin panel. Download Pathauto module from here:

    http://drupal.org/project/pathauto

    To configure Pathauto, navigate to:
    Administer > Site Configurations > Pathauto

    Recommended Setting for Pathauto:

    • Use dash ( - ) as default separator.
    • Don’t check the box for “Create index alias” which will result in Drupal generating additional pages that would be considered duplicate content on your site.
    • Under Node Path Settings, change the default tokens to /[title-raw]
      By doing so, your drupal websites url will be: http://www.example.com/title of the page. E.g. http://www.wowparadisephilippines.com/captivating-capiz.html
    • For the Category Path Settings, change the default to [catpath-raw]
  3. We all know how important is meta tags for SEO. Next very useful SEO module for Drupal site is Meta Tags or Nodewords. This module allows users to add meta tags, eg keywords or description. When you create a page, you will get option to add meta tags and description of your page. Make sure that the keywords you use are included in the body content of your site. Download Meta Tags module from here: http://drupal.org/project/nodewordsTo configure Meta Tags module, navigate to: Administer -> Content Management -> Meta Tags. Here you can specify global keywords that will display on every page.
  4. Having an XML site map of your site submitted to Google is one of the fastest ways to get your site deeply indexed by Google. Drupal ‘s XML Sitemap module, formally known as Google Sitemap. This module automatically generate an xml sitemap that conforms to the proper specifications.

    To configure the xml sitemap, navigate to Administer -> Site Configuration -> XML Sitemap. You can leave the default setting as is. Your sitemap will be located at http://www.websitename.com/sitemap.xml.

    Other useful Drupal Modules are:

    1. Service links Modules: Add Digg, del.icio.us, reddit, Technorati etc. links.
      You can Download this module from here: http://drupal.org/project/service_links
    2. Send - > It add “tell a friend” functionality to any node type.

Step By Step Guide to Upgrade Drupal 5.x website to Drupal 6.x version

Saturday, October 4th, 2008

The latest version of Drupal is 6.4 The version 6.x has many advantage like security fix and many new features. So, its recommended to upgrade your Drupal site to latest Drupal version, currently 6.4 Upgrading to Drupal 6.x is must easier than previous version upgrade. Here is the step by step guide to upgrade your Drupal 5.x web site to Drupal 6.x

Before you start upgrade process from Drupal 5.x to Drupal 6.x version, read this carefully:

  1. Make sure you meet minimum requirement for Drupal 6.x.
    Web Server:
    Apache 1.3 or Apache 2.x hosted on Unix/Linux or Windows.
    IIS5 or IIS6, IIS7 if PHP is configured correctly.

    PHP:
    Recommended: PHP 5.2 or higher.
    Required: PHP version 4.3.5 or higher.

    Database Server:
    MySQL 4.1 or MySQL 5.0
    PostgreSQL 7.4 or higher

  2. Make a backup of all files and database. If anything goes wrong during upgrade process, than you can restore your Drupal 5.x web site. Must make a copy “Files” and “Site” Folder from the Drupal installation directory on your local system.
  3. If your site needs some particular module, ensure that those modules are available because few Drupal 5.x modules are still not available.
  4. Disable all contributed modules and set your Drupal site to default theme such as Garland or Bluemarine. You should upgrade modules and themes after you have completed core Drupal upgradation.
  5. Login in Drupal 5.x web site administrator panel. Navigate to modules setting page. Disable update_status module and uninstall this modul
  6. Again in Drupal 5.x admin panel, navigate to Logs -> Status report
    If there is any problem fix it before upgrade.
  7. Upgrade all installed modules to its latest version available for Drupal 5.x
  8. Set your Drupal site to off-line mode. This can be done as follow. In Drupal admin panel Navigate to : Administrator -> Site Configuration -> Site maintenance -> select site status as off-line -> Save Configuration.
  9. Now using any FTP delete all files and folder from the Drupal installation directory.
  10. Download the latest version of Drupal 6.x from drupal.org. Unpack the files and upload it to the Drupal installation directory.
  11. Copy and paste “Files” and “Site” Folder from your backup to Drupal installation directory.
  12. If other system files such as .htaccess or robots.txt were customized, re-create the modifications in the new versions of the files using the backups.
  13. Run update.php by visiting http://www.example.com/update.php (replace www.example.com with your Drupal installation's domain name and path).
  14. Replace all custom old modules to their latest version compatible with version 6.x
  15. Re-enable custom and contributed modules and re-run update.php to update custom and contributed database tables.
  16. Upload any new theme for your site and enable it.
  17. Now you have updated your Drupal 5.x website to Drupal 6.x . Now login to admin panel and set your website status to online mode.

Drupal Adsense Module Basic Hack

Thursday, November 15th, 2007

We all know that Google adsense implement a new code format, no more color configuration, and channel.

Since Adsense Module is not yet updated I prepared a simple hack so you can still use the module without waiting for the update. All you have to do is open your adsense.module file and look for line 666 (scary). Just remove the unneeded line of code, replace google_ad_channel with google_ad_slot . See sample format below:

Now you are done! On your Admin area, just add your google_ad_slot number under custom channel. You can add upto 10 google_ad_slot same as channel.

The end....