Forum Moderators: open
I just noticed something strange with one of my sites and Google's toolbar PR. If I type in the URL as [example.com...] it has a PR of 4 and all of the interior pages have a PR of 2. But, if I add in the 'www'...http://www.example.com it has a PR of 0, and none of the interior pages have any rank...Can't Google figure out that these are botht he same domain?
[edited by: pageoneresults at 3:53 pm (utc) on July 27, 2004]
[edit reason] Examplified URI References [/edit]
why would typing in the same domain name with and w/o the 'www' make it a different domain?
It's the same reason why typing in the same domain name with and w/o a 'widget' or a 'froobis' or anything else makes it a different domain name. As far as the fundamental nature of the Domain Name System is concerned, 'www' is simply a string of three characters, on a par with 'abc' or 'xyz'.
Which web server(s) you connect to when you give addresses with and without 'www' is completely up to how that domain's DNS administrators configure their DNS servers. And when a particular web server receives requests for URLs with and without 'www', what it sends back is completely up to how that server's administrator has configured it.
Yep. I can trivially put up another site on my domains at example.com and www.example.com. While by convention they are the same, by the RFCs they can be different. Currently, via htaccess I just drag all to www.example.com. I can at a whim change this.
Here's the code that I use, courtesy of the mod at the aforementioned forum:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.example\.org
RewriteRule (.*) [example.org...] [R=301,L]
It works.
[edited by: ciml at 10:11 am (utc) on Aug. 9, 2004]
[edit reason] Examplified [/edit]
#RewriteEngine On
RewriteCond %{HTTP_HOST} "!^www\.mysite\.com"
RewriteRule (.*) [mysite.com...] [R=301,L]
Is it doing the same thing? What does your code do exactly?
(Just asking, just in case; I have no idea how new you are to all of this.)
I think that you also have to remove the # that you currently have in front of the RewriteEngine On command too.
When I checked back on the thread later, I realized what I'd done but it was too late to edit it. Once again, sorry about that.
Anyway man, just drop by the Apache forum. You'll get it all sorted out quickly.
See also: [webmasterworld.com...]