I previously wrote about 301 redirecting www to non www url and vice versa to avoid a possibility of getting a duplicate content penalty, but the is another scenario where you can have two identical homepages.
Google See’s your domain. say www.bettermychance.org and www.bettermychance.org/index.php as two different pages with the same content on both. so a great way to solve this problem is by putting some code in your .htaccess file
Here is what you do:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.bettermychance.org/ [R=301,L]
Replacing my domain above for yours.
Now when anyone goes to your domain.com/index.php they will be redirected to your main URL thus eliminating the chance of a duplicate content penalty.
Tags: , Content Penalty, Google, htaccess, mod rewrite, Redirect, seo
09.Jan.08
Oscommerce SEO, SEO Basics, Site Optimization
Comments (0)
An important factor to remember when first setting up your site is to decide how you would like your URL’s to be displayed. you should choose one and then stick to it.
For example, do you want your name to be displayed as
bettermychance.org
or
www.bettermychance.org
Personally i prefer the more traditional method including the www. at the front of the URL.
So what do i need to do once i have decided the format i want my URL to be displayed in?
The following bit of code needs to be placed in your sites root directory in a file called .htaccess
If you don’t have one, create one via ftp.
If you have decided to go for the www version you need to use the following code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.co\.uk
RewriteRule (.*) http://www.example.co.uk/$1 [R=301,L]
Remember to change example for your own domain.
If you want to use the non www version use this code
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
Again remember to change the example for your own domain.
This is designed to work on Linux servers and will not work on windows server based hosting
Tags: 301 redirect, htaccess, mod rewrite, non www, seo, www
01.Oct.07
SEO Basics
Comments (0)
Search engines love to index static pages and Wordpress has a very simple way of rewriting urls to make them search engine friendly, it is called permalinks and you would of seen this in your Wordpress admin panel under the section options.
The best permalink structure i like to use is this:
/%postname%.html
This will rewrite the url as your post title and give the url the .html extention.
Reason i like this structure, Its a keyword rich URL that is SE’s friendly, Easy to index and good for SERP’s
Tags: htaccess, mod rewrite, Permalink, seo, SERPs, Wordpress
22.Sep.07
SEO For Blogs
Comments (0)