Drupal SEO Tutorial Update

J. Cohen's picture

This Drupal SEO tutorial was written about 1 1/2 years ago and was getting badly outdated, so I updated it.

I'll organize it better when I have time, but at least wanted to have it be current.

In a nutshell:

  1. Enable Clean URLs
  2. Enable Path Module
  3. Install and enable Pathauto Module
  4. Configure Pathauto Module so that it doesn't change your URLs on your when you change the title of a node
  5. Install the Global Redirect Module which will remove trailing slashes on URLs and redirect URLs to their URL aliases.
  6. Install the Meta Tags Module.
  7. Install the Page Title Module
  8. Do NOT install the Drupal Sitemap Module.
  9. Fix .htaccess to redirect to "www" or remove the "www" subdomain.
  10. Fix your theme's HTML headers -- many themes don't do this correctly.
  11. Make sure you don't have PHP session IDs in the URLs (I haven't seen this problem on Drupal sites in a long time).
  12. Fix your robots.txt file. The default robots.txt file still has serious problems in Drupal 6.
  13. Watch out for contributed modules that create extra bad URLs and block them with robots.txt

Hope that is useful as a starting point...

Let me know if I missed anything or if you disagree...

Login to post comments

don't install sitemap module?

purrin's picture
purrin - Thu, 2008-05-08 04:37

I know they are working on the sitemap module currently for drupal 6, but I was curious - what is it about the sitemap module that you think would hurt your seo work? Also, what in robots.txt are seo issues to correct?

-=- christopher

my Las Vegas blog


Drupal sitemap module

J. Cohen's picture
J. Cohen - Thu, 2008-05-08 05:03

The last time I checked the module it was creating serious errors in the XML file.

Also, I don't think most Web sites need XML sitemaps.

Posts about it:
Google's XML Sitemaps [me]
Verify but don't submit [SEOmoz.com]

XML sitemaps don't help ranking -- they just help with indexing. If you have inbound links and good content organization, search engines will find your content.

I did a test more recently where Google will fetch a page in an XML sitemap even if it doesn't have links. It may be useful on really large sites, but even then I would try to modify the internal linking strategy before spending time on XML sitemaps.

Here is a sample problem with the default robots.txt file:

Disallow: /user/register/

The links on a typical node say "Login or register to post comments" and the links go to URLs like example.com/user/register?destination=comment/reply/16%2523comment-form

The robots.txt rule Disallow: /user/register/ won't block search engines from following example.com/user/register?destination=comment/reply/16%2523comment-form because there is no slash after register...

There is a longer tutorial about it here.


Regular Sitemap?

ipwa's picture
ipwa - Thu, 2008-05-08 09:10

I used to use the XML Sitemap module, and once even started thinking about parsing the XML to be able to theme the sitemap. I got to the point of even thinking about manually doing a sitemap, but then I found ths module: http://drupal.org/project/site_map. It generates a regular sitemap in a page, and it's very easy to theme. In some cases I think having these human-readable sitemaps will help some users navigate through your site, although I must admit I never look at sitemaps when browsing websites.

Nicolas

http://nic.ipwa.net


site map

J. Cohen's picture
J. Cohen - Thu, 2008-05-08 15:25

That HTML sitemap module (http://drupal.org/project/site_map) looks like a good one for SEO because it helps search engines find your pages. I don't think the XML Sitemap Module should be installed though.


Drupal site_map module

J. Cohen's picture
J. Cohen - Sun, 2008-05-25 08:53

I just installed that site_map module on a site and noticed a problem for SEO.

If you list taxonomy terms in the sitemap it uses the Drupal paths and not the URL aliases. That will create duplicate content.

Example:
The module outputs a link to example.com/taxonomy/term/7/all instead of example.com/category-name. The feeds too (though most of the feeds should be blocked with robots.txt anyway).

I'll add an issue to the project if there isn't one already...

EDIT: there already is an issue here.


There is also site menu

kbahey's picture
kbahey - Thu, 2008-05-08 15:37

There is also the Site Menu module http://drupal.org/project/sitemenu. It generates a site map page with nodes grouped by taxonomy.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.


sitemenu

J. Cohen's picture
J. Cohen - Thu, 2008-05-08 18:09

That is a good module. I use it but wish it would paginate because Google prefers fewer than 100 links per page.

Google's Webmaster Guidelines:

Offer a site map to your users with links that point to the important parts of your site. If the site map is larger than 100 or so links, you may want to break the site map into separate pages


Log an issue

kbahey's picture
kbahey - Thu, 2008-05-08 18:32

Can you please log an issue for it in sitemenu's queue? Thanks.

Drupal performance tuning, development, customization and consulting: 2bits.com, Inc..
Personal blog: Baheyeldin.com.


sitemenu

J. Cohen's picture
J. Cohen - Fri, 2008-05-09 00:27

Added it...


thanks!

ipwa's picture
ipwa - Fri, 2008-05-09 11:30

Hey thanks for writing that module it's awesome!

Nicolas

http://nic.ipwa.net


I just made an issue

ipwa's picture
ipwa - Fri, 2008-05-09 11:29

I just made an issue (http://drupal.org/node/256561) for the SEO Checklist module (http://drupal.org/project/seo_checklist) to reference the site_map module instead of the XML sitemap, citing this thread.

Nicolas

http://nic.ipwa.net


Thanks for the update

priandoyo's picture
priandoyo - Thu, 2008-06-26 01:20

Thanks for the update, i didn't there is a lot of issue about that. Currently i used xml site map and just think everything running normal.

-Anjar Priandoyo-
SecurityProcedure.com


Domain Name

sk3ptic - Fri, 2008-07-04 17:11

How important is the domain name for SEO? I started my first drupal site and I can't get it indexed and I did everything one can possibily do, so I figure it's the domain name. The website is www.topjester.com


domain names and SEO

J. Cohen's picture
J. Cohen - Fri, 2008-07-04 19:28

The domain name is not that important for SEO.

How long ago did you put the site online?
EDIT: The domain name is only 6 days old.

If you click here your home page is indexed:
http://www.google.com/search?q=site%3Atopjester.com&num=100

Click that link again in 7 days and you should see a lot more pages listed.


Hey thank you for sharing

chronis - Fri, 2008-12-26 11:22

Hey thank you for sharing the information .This is nice information.

outsourcing |outsource projects|freelancing| freelancers| freelance work| outsource work.