Seo Page URL's
Search engines will see certain url's as different url's and may count the page as duplicate content view the first few sentences here. The best way to avoid this conflict is to do a 301 redirect meaning that the page has moved permanently.
I'll use thunderware as an example. The url's thunderware.net and www.thunderware.net (notice the www) are considered different url's to google because of the www subdomain. There are two very simple ways to eliminate the possibility of duplicate content due to the www subdomain. One is via the .htaccess file and the other is via php.
1.) add the following lines to the .htaccess file of your webserver and also make sure that htaccess files are enabled (instruction for apache are here; google "enable htaccess for <insert your webserver here>" for other directions).
RewriteCond %{HTTP_HOST} ^thunderware.net
RewriteRule (.*) http://www.thunderware.net/$1 [R=301,L]
2.) add the following lines to the beginning of your index.php file, or the file that is used as the entry point to your site. Also you can add this to the beginning of every file if you feel so inclined. One warning is that a check needs to occur before this script is called before the redirect is called so that an infinite redirect doesn't occur.
<? Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.thunderware.net" ); ?>
I believe that the htaccess way of redirect is more effective since the php script above will always redirect, and until I have a moment to rewrite this entry this will have to suffice. Use the htaccess if possible.
Information found at webconfs.com and Google Webmasters




Write a comment