Simple .htaccess Hack for Drupal SEO
On a fresh install of Drupal, you'll encounter issues with how your website's domain can be accessed. Out of the box, you'll be able to access your site both with and without the "www" prefix. This can be a problem for Drupal SEO, as the potential exists for search engines to think your website contains duplicate content, even when it doesn't. This isn't a fix that will lead to dramatic improvements, but it's a good SEO best practice for Drupal sites.
Step 1: Find Your .htaccess File
This file will be located in the directory where you installed Drupal.

Step 2: Download to Your Desktop and Edit
Use your favorite HTML editor.
Step 3: Find the Code
Should be around line 80.

Step 4: Edit the Code
Uncomment (delete the # from lines 87 & 88) and adapt (change "example.com" to your domain, be sure to leave any other characters such as the "^" or "\")

Step 5: Upload and Replace
And you're done! No matter how you type in your domain, it should all redirect to the "www" version.


How bad is it?
From my understanding duplicate with and without www isn't that much of a problem any more, right or wrong?
Mia
Me
i learned from this trick
i learned from this trick alot that was very nice of you thanks again for htaccess secret Term Paper Help | Thesis Help
cPanel you need to make sure
cPanel you need to make sure you have marked the option to show dot-files such as .htaccess.
Dissertation Help | Essay Help | Research Paper Help
Ht acess common mistake
most people do not know how to properly set up their ht access file and make the same mistakes.. be careful. oh and great post!
Very Nice
Thanks for the post, i learned from this trick alot that was very nice of you thanks again for htaccess secret
Simple but brilliant
Thanks, this is simple to do but brilliant.
When you access the File Manager i cPanel you need to make sure you have marked the option to show dot-files such as .htaccess.
simplicity
Ofentimes, simplicity = brilliance...
Added to DrupalSightings.com
Added to DrupalSightings.com