I'm still playing around with my site and have noticed that if I type http://url.com it takes me to my site as well. Is there any danger in having both the http://www.url.com address work as well as the http://url.com ??
I guess I would be curious to know why you'd be worry about that? I don't know the answer to this, but I'm curious as well.
Well maybe not life and death dangerous but I suppose I'm more so concerned that search engines might view it as 2 sites and therefore may affect PR or something in some way?
google will think its 2 sites. If you use google sitemap, you can tell google to always use the www. one.
Thanks for that link. So basically I need to place the following code in the .htacess file of the root directory: Options +FollowSymlinks RewriteEngine on rewritecond %{http_host} ^domain.com [nc] rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] Code (markup): Can I simply cut and paste this code into the existing .htaccess file? If so does it matter where I paste it? Thanks
Actually you do not use a 301 to fix this 301 fixes broken links on the web You need to do a Canonical URL rewrite The goal of this rule is to force the use of a particular hostname, in preference to other hostnames which may be used to reach the same site. For example, if you wish to force the use of www.example.com instead of example.com, you might use a variant of the following recipe. Solution: RewriteCond %{HTTP_HOST} !^fully\.qualified\.domain\.name [NC] RewriteCond %{HTTP_HOST} !^$ RewriteRule ^/(.*) http://fully.qualified.domain.name/$1 [L,R] This should solve your problem and solidify your PR 301 wtf?
Run this script and you'll see. <?php $fp = fopen("http://google.de", 'r'); $meta_data = stream_get_meta_data($fp); fclose($fp); print_r($meta_data); ?> PHP:
Pickels The 301 code others gave you is if you changed page names and people linked to the old page name it will forward them to the new page name. The canocical URL rewrite takes any links (broken / links others place) to your site and resolves them to the correct URL and at the same time solidifys your Google PR.
use: RewriteEngine On RewriteCond %{HTTP_HOST} ^[COLOR="Red"]domain.com[/COLOR] [NC] RewriteRule ^(.*)$ http://www.[COLOR="Red"]domain.com[/COLOR]/$1 [L,R=301] Code (markup): replace the red parts with your domain name
It may or may not be I dont trust many people here.... Also you posted the same 301 code which doesnt solve the problem correctly... Just read my post it should make perfect sense. If not I will be glad to meet anyone on IM or phone tomorrow