Forum Moderators: open

Message Too Old, No Replies

example.com and www.example.com

         

ichthyous

3:35 pm on Jul 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hi there,

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]

py9jmas

3:51 pm on Jul 27, 2004 (gmt 0)

10+ Year Member



Can't Google figure out that these are botht he same domain?

www.example.com and example.com aren't the same domain.

[edited by: ciml at 10:08 am (utc) on July 28, 2004]
[edit reason] Examplified [/edit]

ciml

10:16 am on Jul 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's right py9jmas, it's just like having www.foo.example.com and www.bar.example.com, or www.example.com and www.example.org, or www.example.com/foo.html and www.example.com/bar.html

The 'problem' is just the same (serving the same content at different URLs).

ichthyous

1:34 pm on Jul 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Can you elaborate a bit more on this? I understand that a subdomain is considered a different domain, but why would typing in the same domain name with and w/o the 'www' make it a different domain? I thought it was just different ways of accessing the same domain name.

ciml

3:54 pm on Jul 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nope, they're different.

I think it's easier if you turn it round to why they should be the same.

For example, advantage and disadvantage. They both end in advantage but they have quite different meanings!

ichthyous

4:08 pm on Jul 28, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, but nodody really seems to be able to explain what the difference is. I like to know why things are the way they are, not just that they are. Thanks

jtbell

4:19 pm on Jul 28, 2004 (gmt 0)

10+ Year Member



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.

g1smd

5:02 pm on Aug 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



www.example.com is just a subdomain of example.com

Other subdomains are home.example.com and users.example.com and groups.example.com and downloads.example.com and so on.

rfgdxm1

5:34 pm on Aug 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>Other subdomains are home.example.com and users.example.com and groups.example.com and downloads.example.com and so on.

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.

ichthyous

6:36 pm on Aug 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What do you mean via htaccess you can change this? Is there a line of code which merges them all? My problem is that my pages with "www" have no rank while the pages without "www" show rank. Is there some code I can place in the htaccess file which can remedy this? Thanks

Stefan

7:13 pm on Aug 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That would be more appropriately asked/answered in the Apache forum, but anyway...

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]

ichthyous

7:34 pm on Aug 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I already have this in my htaccess file:

#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?

g1smd

7:43 pm on Aug 8, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Dumb question of the week perhaps, but you do have your own real URL in place of the mysite.com bit, yeah? (two places).

(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.

ichthyous

12:04 am on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes, I do have my own URL...I thought it wasn't allowed to post them on here though. Can anyone explain exactly what Stefan's code does? thanks

Stefan

1:12 am on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yeah, it's not allowed to post URL's... I phased out and did a straight copy and paste from my .htaccess

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.

g1smd

1:05 pm on Aug 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What about the #? Did you delete that yet?

See also: [webmasterworld.com...]