SEO in Drupal: On Page Optimization

This is a basic tutorial that will cover Search engine optimization in Drupal, mainly on page optimization. This tutorial will help your site to prevent some Common Drupal  SEO Errors and help search engine in indexing your site.

Summary:

  • Enable CleanUrls


  • Install and Enable Token Module and Global Redirect.

  • Install and Enable Path Auto Module

  • Install and Enable Meta Tags

  • Install and Enable Page Title
  • Install and Enable XML SITEMAP module

  • 301 Redirect to www or either remove www subdomain.

  • Create Custom Front Page.

Modules mentioned/Useful:

Enable Clean  URLs

Google and other search engines prefer clean URL’s. Clean urls can be automatically enable in D6 if the server allows it. If there is any issue enabling clean urls refer to http://drupal.org/node/15365

Install Pathauto Module

Path Auto module makes nice customized URLs based on tokens, and you can name path based on title, content type, date, taxonomy and username.

We can also used pathauto to name url  for every page, but that will become tedious if the site is large.

NOTE: It’s a bad idea to change the url of an existing site, because search engine will not be able to find the new specified path, in that case you can use a 301 redirect from your old path to new path.

Go to 'admin/build/path/pathauto'  -> General Settings ,For update action choose “Do Nothing. Leave the old alias intact.” Otherwise the url of nodes will change everytime you change the title of your post. Causing problems with search engines.

Global Redirect Module

Global Redirect Module is useful in redirecting the node path automatically to its alias. For example if you have a node at domain.com/node/133, Global redirect will redirect this url to your alias in path auto domain.com/my-page-title.

Similarly if node/123 is your front page. Global redirect will redirect domain.com/node/123 to domain.com.

 

http://domain.com/blog/title

http://domain.com/blog/title/

These two address should be same on a normal drupal site, to prevent Page not Found errors because of these two path. You have to get rid of trailing slash. You can edit your .htaccess file and add the following code.

#get rid of trailing slashes
RewriteCond %{HTTP_HOST} ^(www.)?domain\.com$ [NC]
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]

Global Redirect Module will remove trailing slashes for you as well

Meta Tags a.k.a. Nodewords Module

Meta tags is very important for search engines, there is a misbelieve in people that they are of no use in search engine optimization.

Meta Description is very important, it should be different on different pages. It should be no more than 25 words.  It should be short and should summarize the page, with main keyword in it. It’s a good idea to insert your keywords in that. It’s the text that will make human visitors click on your site link in search engine.

You can set some default keywords of your site that you can be used on every page. Add some more based on post so that it makes a unique combination, of relevant keywords.

You can use the teaser of the page if the meta description is not set. That way each page will get unique meta description if the user don’t have access to edit those tags.

Page Title Module

This is highly Recommended, The Page Title Module allows you to easily set page titles for every node.

XML Sitemap Module

Although Google claims that they will index your site without the need of submitting a sitemap. I find that the whole site never gets indexed in Google. This module allows you to upload latest sitemaps to all major search engine. And it will update the xml sitemap at every cron run.

Drupal Rewrite Rules

Make sure you do a permanent 301 redirect on your url, either with “ www” or without www subdomain.

Go to the .htaccess file

To remove the www from your site, look for the following code in your .htaccess file and uncomment and adapt:

# To redirect all users to access the site WITHOUT the 'www.' prefix,

# (http://www.example.com will be redirected to http://example.com)

# uncomment and adapt the following:

# RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]

# RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

 

To redirect to the www subdomain of the site, look for the following code and uncomment and adapt:

# To redirect all users to access the site WITH the 'www.' prefix,

# (http://example.com/... will be redirected to http://www.example.com/...)

# adapt and uncomment the following:

# RewriteCond %{HTTP_HOST} ^example\.com$ [NC]

# Rewrite Rule ^(.*)$ http://www.example.com/$1[L,R=301]

Note: Make sure to Replace example.com with your domain.

Fix Your HTML headers

In SEO there should be not more than one <h1> tag in a page and it should have your main keyword in it.

And in teaser view make sure the title of the node in the teaser view is in <h2> or <h3> tag and heading of the page( page name, taxonomy term name) is in h1 tag. Node view page title should be In h1 tag.

Custom Page for Front Page

The /node page is the custom page of the drupal by default. When search engine will spider your site it will get that page. To fix this use your custom front page to prevent duplicates.

Install Open Calais

This is a great service, read more about open calais at http://opencalais.com

18 Response to "SEO in Drupal: On Page Optimization"

Anonymous's picture
Anonymous (not verified)
December 12th, 2009 11:00 pm

Thanks a lot my friend. I will try these on my page. I hope it does work

Anonymous's picture
Winni (not verified)
January 2nd, 2010 01:39 pm

Thanks for the tips..I'm learning the tricks about SEO in Drupal, what you just shared will be an added knowledge on my part..Happy New Year!

Anonymous's picture
SEO (not verified)
January 7th, 2010 02:36 am

Thanks for SEO Article

Anonymous's picture
Konya chat (not verified)
January 8th, 2010 04:46 am

Hi, your blog is very useful information. As I learn more new things. I wish you continued success, Thanks

Anonymous's picture
SEO (not verified)
January 12th, 2010 03:18 pm

Good news for us.

Anonymous's picture
Challenge Coins (not verified)
February 1st, 2010 10:27 pm

Great plugin for drupal. It's very important to be able to adjust the seo aspects when building a Drupal application.

Anonymous's picture
Padizine (not verified)
February 12th, 2010 05:14 pm

Really nice tutorial, thanks. If you'd like a more in-depth tutorial for the Page Title module, you can find one here: Padizine Blog. Cheers.

Anonymous's picture
SEO Brisbane (not verified)
February 23rd, 2010 04:14 am

"Meta tags is very important for search engines, there is a misbelieve in people that they are of no use in search engine optimization" I don't know who think what about meta But I think meta is just good.

Anonymous's picture
wddtechnologies (not verified)
February 25th, 2010 12:24 pm

Thanks for the great article. Louise

Anonymous's picture
Anonymous (not verified)
April 30th, 2010 04:19 pm

Thanks for the tips..I'm learning the tricks about SEO in Drupal, what you just shared will be an added knowledge on my part..

Anonymous's picture
Firma Rehberi (not verified)
May 15th, 2010 12:34 am

Thanks a lot my friend. I will try these on my page. I hope it does work

Anonymous's picture
video izle (not verified)
May 17th, 2010 06:06 pm

thanks to very good information.
-------------------------------------------------
Video izle

Anonymous's picture
Orange County SEO (not verified)
June 1st, 2010 03:38 pm

Nice article, Having all the importance tips for website optimization. I know some features of website optimization, here i also found some very good features. Please continue writing....

Thanks

Anonymous's picture
Does Zeno Work (not verified)
June 12th, 2010 02:22 pm

I always used wordpress. Don't know why anyone would use drupal unless a neccessity arrives. Does Zeno Work

Anonymous's picture
konyachat (not verified)
June 15th, 2010 02:38 pm

liked thanks admins..

Anonymous's picture
konyachat (not verified)
June 15th, 2010 02:39 pm

liked thanks

Anonymous's picture
Hameed (not verified)
June 22nd, 2010 06:30 pm

Nice website and very much thanks for providing information about SEO with Drupal Page optimization and nice comments

Anonymous's picture
Seo (not verified)
June 23rd, 2010 03:32 pm

Thank you very much for this information. Good post thanks for sharing.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <b>
  • Lines and paragraphs break automatically.
  • Search Engines will index and follow ONLY links to allowed domains.

More information about formatting options

CAPTCHA
Sorry, But we have to verfiy that you are not a Bot
Image CAPTCHA
Enter the characters shown in the image.