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 or register 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's picture
chronis - Tue, 2010-12-21 07:24

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

Chronis Tsempelis
Chairman & Founder
MarketRaise Corp.
A SEO Company from NY, USA


robot.txt issue

joydipraha - Tue, 2009-12-15 07:14

robot.txt in d6.14 says that if that file is not in the root then it will be ignored.so if i sift the file to another directory or if i delete the robot.txt file then that will still also preventing the web crawler?how it will effect the SEO process?

Thanks in advance

joydip


If robots.txt isn't in the

J. Cohen's picture
J. Cohen - Tue, 2009-12-15 07:17

If robots.txt isn't in the root of the domain or subdomain (not the root of the Drupal installation), robots will ignore the file.

For example:

These are okay:
http://example.com/robots.txt
http://subdomain.example.com/robots.txt

These won't work:
http://example.com/drupal/robots.txt
http://subdomain.example.com/drupal/robots.txt

--
» Twitter » Blog » Website


Thanks for you quick

joydipraha - Tue, 2009-12-15 07:28

Thanks for you quick response..

After go through the robot.txt i found that it preventing my site from web crawler.so if i delete this file how it may effect my site for SEO process?


Having a robots.txt file is

J. Cohen's picture
J. Cohen - Tue, 2009-12-15 08:39

Having a robots.txt file is important for SEO. This page is a good palce to start.

--
» Twitter » Blog » Website


thanks a lot.........

joydipraha - Tue, 2009-12-15 09:17

thanks a lot.........


oops, just now saw, how old

PlayfulWolf's picture
PlayfulWolf - Tue, 2009-12-15 11:46

oops, just now saw, how old this thread is...


SEO

J. Cohen's picture
J. Cohen - Tue, 2009-12-15 20:00

No problem. :)
XML Sitemaps are not needed on the average website. It won't get your new content indexed any faster than the easier RSS/ping method. It's difficult to get XML Sitemaps right and the last time I looked (which was a while ago) the Drupal module wasn't getting it right. Also, Drupal sites can get so complicated (with views, etc.) I don't know if a module can automatically figure that out. It's better to rely on good internal linking structure to get indexed well.

To see if you Drupal theme headers are setup correctly for SEO, try the Firefox X-ray extension, or just ctrl-u to view source and then ctrl-f to search for h1 and h2 elements.

--
» Twitter » Blog » Website


Do you ..

tigron's picture
tigron - Mon, 2010-10-25 16:50

Do you still feel the same way now with the XML sitemenu module ? I'm curious about the latest version. I'm using it now but I really need a site map to fit clients request and I'm not sure which way to go.


I also am curious about this

JonisJon - Mon, 2011-05-16 06:14

I also am curious about this -- I am using the XML sitemap now and it seems to be doing a decent job, is it not?


It seems to me that the XML

comewander - Fri, 2011-12-30 21:22

It seems to me that the XML sitemenu module has changed since this post. Is there any further information that you have?

www.seobounty.com