Forum Moderators: open

Message Too Old, No Replies

redirect to www?

         

lbobke

12:20 am on Oct 13, 2004 (gmt 0)

10+ Year Member



There never was a difference between the PR for my Website entered with and without the "www".
Didn't check for a while though.
Now, "www.example.com" has PR6 (as before) while "example.com" is PR2.
I see that G finds one link to "example.com".
Is it advisable to redirect (301) from the www-less version to www.example.com?

Laurenz

lgn1

12:18 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was wondering the same thing. You think that google would be able to figure out that www and www-less domains are just aliases, that point to the same IP address, and treat them the same.

I have a www, and www-less domain and a .ca and .com
domains all pointing to the very same IP address. In
the past Google choose one to index and ignored the rest.

A few weeks ago, Google changed their duplicate content algorhim and I was dropped from Google (site:www.widget.com or .ca with or without www turns up nothing). However I still have pagerank.

So I don't know if google messed something in the new Dup Content Algorthim or if it was intentional.

If it was intentional is was stupid. Its perfectly valid to have a .ca and .com domain with duplicate content, as I advetise one for canadians who prefer to shop on .ca (canadian sites) and Americans who prefer to shop on .com site.

rainborick

1:01 pm on Oct 13, 2004 (gmt 0)

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



You should absolutely set up a 301 redirect to the "www." version of your URL. While Google will probably catch on to the situation eventually, in the meantime your site is subject to several different problems that can damage your rankings like having your PR split between the two URLs and possibly duplicate content penalties. Since there's good reasons in favor of doing this, and virtually no reason NOT to do it, why wait? Good luck!

No5needinput

1:12 pm on Oct 13, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



I added this to my .htaccess file

RewriteEngine on
RewriteCond %{HTTP_HOST}!^mysite\.com
RewriteRule ^(.*)$ [mysite.com...] [R=301]

and it redirected www to non www fine (90% of links are to non www)

However when I checked my subdomains they were as follows:

[maindomain.com...]

instead of

[subdomain.maindomain.com...]

How can I redirect www to non www and preserve the subdomain stuctures?

Thanks.

[edited by: No5needinput at 1:35 pm (utc) on Oct. 13, 2004]

diamondgrl

1:22 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No5needinput,

I felt the need to input because listing your site is against the terms of service of this site.

No5needinput

1:37 pm on Oct 13, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



oops Too early in the morning I just copied and pasted without realizing.

Fixed now.

lgn1

3:46 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



My understanding is that having duplicate content across several IP's is bad.

Having several aliases for a domain name on the same IP is not duplicate content. Their is only one content. Just several alias URL's that point to the same content.

I could see if somebody had hundreds of keyword specific URL's and was spamming the engines, Google would be upset, but my understanding is that Googleguy once said they concatonized www and non-www and .country and .com down to the simplest form of the .com domain. Correct me Googleguy if i am wrong.

isitreal

5:21 pm on Oct 13, 2004 (gmt 0)

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



pick one or the other, I just checked this:

site:www.domain.com
site:domain.com

this site redirects to domain.com

0 pages listed for site:www.domain.com
all pages listed for site:domain.com

Ideally search engines would treat this the same, if there were no spammers/cloakers in the world, but the unfortunate fact is that www.domain.com and domain.com can be separate websites if you use mod_rewrite

It doesn't matter I think which you pick, the user will never see it with the correct mod_rewrite
=================
re the subdomains, you need to add exclusions for the subdomains, I'm not very good at mod_rewrite, but the basic idea is this, pseudocode

if
rewritecondition subdomain1 ¦ subdomain2 ¦ subdomain3 do nothing
else
rewrite condition ^domain.com rewrite to www.subdomain.com

BillyS

8:19 pm on Oct 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I am wondering the same myself. After the last update, I am in this situation:

www.widget.com/ - PR3
widget.com/ - PR2
www.widget.com/index.php - PR2
www.widget.com/category/ - PR4

Me thinks that PR is split on the home page. I am using mod_rewrite already - any direction is appreciated.

g1smd

8:43 pm on Oct 13, 2004 (gmt 0)

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



If you ever link to a page that is the default page name, then don't include the name of the page in the link, just refer to the domain, or the folder.

That is link only to: www.domain.com/ and to www.domain.com/folder/.

Don't link to: www.domain.com/index.html or to www.domain.com/folder/index.html and so on.

newsphinx

3:26 am on Oct 14, 2004 (gmt 0)

10+ Year Member



If there is no reason not to do 301 redirect from domain.com to www.domain.com, then how can I do it on IIS server?

webdude

11:55 am on Oct 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In IIS...

Open IIS in MMC -- expand all sites.

Right click on site you wish to redirect and go to "Properties."

Click on "Home Directory" tab.

In the "Redirect to:" field, fill in the complete URL of the site/page you want to redirect to. Include "http://"

Check "The exact URL entered above."

Check "A permanent redirection for this resource."

Click "Apply" and close.

webdude

12:02 pm on Oct 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



oops!

Forgot.... In IIS...

You need to click on "A redirection to a URL" before the other options become available.

Sorry.

Blackguy

4:40 am on Oct 15, 2004 (gmt 0)

10+ Year Member



i was thinking about this duplicate thing. Would google really check for duplicate content over different ips? how much calculation would it need to do that? even on one ip.

webdude

11:50 am on Oct 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Blackguy,

I agree with you. It seems pointless to degrade your site if you are using www or not. Back in the good 'ol days, www was for a companies' web site and the domain name without www was usually the email server. But back in the good 'ol days, webservers and software were not as smart as they are now. Today it is possible to just add a pointer record in your DNS so both types can go to the website. If you need an email server, just add another pointer to mail.widget.com. Need a different ftp server? Just add ftp.widget.com and so on... Most sites today utilize both www and no www, so what is the real point in making this a problem? It seems that the G would have fixed this.

But then we get into whether or not the WWW thing is really occurring. I know it seems to affect the little green bar that everyone is hung up on but my question would be if anybody has seen or experimented with this to see if the problem actually exists in the SERPs. PR is one thing, but the returns are a whole different matter.

jdMorgan

1:45 pm on Oct 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No5needinput,

The problem you're having with subdomains is due to the construct you used in the RewriteCond. As posted it says, "IF the requested domain is NOT "mysite.com", then redirect." Therefore, all domains and subdomains NOT equal to "mysite.com" will be redirected. By changing that to a positive match, you can avoid the problem:


RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.mysite\.com
RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L]

This will redirect only requests for www.mydomain.com.

Also, add the [L] flag as shown unless the output of this rule needs to be further rewritten during the current HTTP request.

Some server configurations will require the addition of

 Options +FollowSymLinks 

ahead of the RewriteEngine on directive, in order to enable mod_rewrite [httpd.apache.org]. It's only necessary if the code won't work without it.

Jim

No5needinput

4:44 pm on Oct 15, 2004 (gmt 0)

10+ Year Member Top Contributors Of The Month



jdMorgan

Thanks very much. That works perfectly. I've been going x-eyed trying to sort it out.

Google has my site listed as non www and Yahoo with www so I'm sure there would have been a clash sooner or later.

Florida88

6:25 pm on Oct 15, 2004 (gmt 0)

10+ Year Member



Another question on redirect.

Before our site was redesigned early this year the old site used frames (the new site does not)

The old site home page was named www.mysite.com/home2.html and the frame was mysite.com/navigation2.html.

When the new site launched the homepage was named mysite.com/index.php.

Here's the question. I saw today the the old page names (home2.html and navigation2.html) have some sort of a redirect that reads in part:

<FRAMESET ROWS="100%,*" cols="100%,*" border="0" frameborder="0" framespacing="0">
<FRAME SRC="http://www.mysite.com" scrolling="auto" noresize>
</FRAMESET>

Is this a problem for google?

Thanks

Marcia

4:40 am on Oct 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Google knows the difference between www and without, and at one point did resolve the problem with the two. But they were getting gamed with that as far back as I can remember, and I figure they must have "unfixed" it so the strategy would't work any more.

It's my guess that that's possibly the reason we're seeing a domain.com URL only version of the homepage of sites in the index a lot of times when there aren't any links done that way. Of course I could be wrong, but I believe it's quite possibly one of their measures to combat spam issues.

lbobke

8:33 am on Oct 16, 2004 (gmt 0)

10+ Year Member



I tried redirecting my non-www page to the www-version - and had a similar problem as No5needinput: it worked fine for the main domain, but also tried to redirect the subdomains.
Is there an easy solution for this constellation?
Do I have to exclude the individual subdomains from the directive or is there a way to tell Apache to only redirect if there is nothing between the "http://"
and "mydomain.net"?
I do not want to go the other way as there is only one link to the "www-less" page as compared to several hundred to the www-version...

Thanks!

Laurenz