homepage Welcome to WebmasterWorld Guest from 54.237.95.6
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Google / Google SEO News and Discussion
Forum Library, Charter, Moderators: Robert Charlton & aakk9999 & brotherhood of lan & goodroi

Google SEO News and Discussion Forum

    
301 redirecting every "no www" to the home page
F_Rose




msg:3214842
 4:14 pm on Jan 10, 2007 (gmt 0)

We are 301 redirecting every "no-www" to the Home Page, we are not redirecting to the "with-www" version of the same page.

We can not set it up the right way using IIS. The only we could do it is split the traffic which could cause duplicate issues with Google.

I was wondering if it's OK, to redirect the "no www" of every page back to the home page?

 

tedster




msg:3215242
 8:51 pm on Jan 10, 2007 (gmt 0)

It sounds like a recipe for disaster to me. I would not encourage that approach.

>> We can not set it up the right way using IIS.

301 Redirect "no-www" to "with-www" on IIS

1. Assuming that www.example.com is already set up as a "website",
go into Internet Services Manager and also set up example.com
(no www) as a website.

2. In Internet Services Manager select the new example.com website
and go into Properties.

3. Under the Home Directory tab, change the option button
"When connecting to this resource the content should come from"
to "A redirection to a URL".

4. Enter the URL as http://www.example.com

5. IMPORTANT:
Check the box "A permanent redirection for this resource." Otherwise
you get a 302 redirect instead of a 301.


hutchmeister




msg:3215346
 10:27 pm on Jan 10, 2007 (gmt 0)

I can't comment on the rank/positioning effects of doing the 301 and redirect to homepage, but it seems that it could be a pain for visitors.

When you say "We can not set it up the right way using IIS", are your pages in html only then? if they are php, asp etc then you can include a global header or footer that does the redirect based on current URL.

I have one included in the top of my php pages (and old asp sites when I used to write them) called 'urlfix' that seems to do the trick.

centime




msg:3215355
 10:41 pm on Jan 10, 2007 (gmt 0)

If you use asp, i do suspect that you can write a script that would redirect all visitors to the www version of the url

I am going to have a go at it

Problem is, the last time I did this, its not happy with urls with variables after the "?"

it simply drops the variables,

Now, this may be a daft question but, does your redirection also operate on a user navigating your internal links?

from say index.htm to contactus.htm

hvacdirect




msg:3215365
 10:50 pm on Jan 10, 2007 (gmt 0)

Here's what I use on all asp pages, I set it up as an .asp page itself, then add an include. Transfers server variables and will work in subdirectories as well. No need to adjust for mydomain.com etc, it looks that up. I've got the www to non-www version as well if anyone is interested.


<%

Dim Domain_Name, theURL, QUERY_STRING, HTTP_PATH,TEMP_NUM
'Get domain that the page is on
Domain_Name = lcase(request.ServerVariables("HTTP_HOST"))
'Check if URL is the www version
if left(Domain_Name, 3) <> "www" Then
HTTP_PATH = request.ServerVariables("PATH_INFO")
'Check if page is default.asp if so, redirect to "/". If other index page is used, such
'as index.asp the numbers in the right and len statement need to be changed, as well
'as the IF statment to indicate the index page.
If right(HTTP_PATH, 12) = "/default.asp" Then
TEMP_NUM = len(HTTP_PATH)-11
HTTP_PATH = left(HTTP_PATH,TEMP_NUM)
End If
' Sets the new URL settings with correct page
QUERY_STRING = request.ServerVariables("QUERY_STRING")
theURL = "http://www." & Domain_Name & HTTP_PATH
'This section passes on the query string variables
if len(QUERY_STRING) > 0 Then
theURL = theURL & "?" & QUERY_STRING
end if
' Send 301 response and new location
Response.Clear
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", theURL
Response.Flush
Response.End
end if
%>


F_Rose




msg:3217641
 7:59 pm on Jan 12, 2007 (gmt 0)

The problem is we have done a url rewrite through an ISAPI Filter.

For that reason our site is much too complicated for it to work with the codes above.

Any other suggestions?

tedster




msg:3217676
 8:36 pm on Jan 12, 2007 (gmt 0)

The reason that redirecting all no-www urls to the Home Page would be a disaster is that you would be creating a massive duplicate content situation. The issues and solutions have been pretty well presented here. You may need to change your approach -- it sounds like you've painted yourselves into a techical corner,

adamas




msg:3220875
 11:50 am on Jan 16, 2007 (gmt 0)

tedster, I still don't understand where the duplicate content comes from.

Redirecting from non-www to www (specific page) with a 301 is the generally recommended way to fix duplicate content. In that case you have one URL with a 301 and one URL with a 200. If redirecting all to www home page then you have multiple URLs with 301 and still only one URL with a 200.

Are you saying that multiple 301s to a single URL counts as duplicate content?

Ride45




msg:3221092
 4:08 pm on Jan 16, 2007 (gmt 0)

RE: Are you saying that multiple 301s to a single URL counts as duplicate content?

I have the same question. I am removing a few hundred category pages and want to 301 redirect to one main category page? All of this is done on-domain. But is this a red flag? I don't care if these pages appear in the main index or not.. I just don't want them spidered, indexed etc..

F_Rose




msg:3222583
 6:30 pm on Jan 17, 2007 (gmt 0)

Tedster,

"RE: Are you saying that multiple 301s to a single URL counts as duplicate content?"

Kindly respond to this..

tedster




msg:3222605
 6:53 pm on Jan 17, 2007 (gmt 0)

I'm wrong -- that should teach me to post when I'm exhausted. No duplicate content probem here. That would only happen if you used 302, but not with 301.

The issue is that the Home Page cannot be the "new location" for all those no-www urls. So set the 301 to point to the with-www version of each url, not the home page. Google knows that "301 networks" are a current spamming tool and misused 301 redirects are not a healthy thing to do for your site's future stability.

Ride45




msg:3222607
 6:54 pm on Jan 17, 2007 (gmt 0)

F,
After mulling this topic over, I think what is being said is that it's safer to 404 these pages, whereas if you 301 them to a single page, the SE's may look at this technique as doorway page spamming (if all of you removed pages were in the main index), versus just a site clean up (which is what your intention likely was). Just my opinion though

F_Rose




msg:3222618
 7:04 pm on Jan 17, 2007 (gmt 0)

Having too many 404 errors is not a problem with the search engine?

Ride45




msg:3222631
 7:16 pm on Jan 17, 2007 (gmt 0)

If you porperly serve the 404 error document for the dropped pages, the bots will get it, and drop those pages. Too many dropped pages too soon could be risky [insert red flag here], but that would happen either way, whether you 404'd them or 301'd them. Maybe do it in batches and incrementally if you can so the changes are not overwhelming and drastic. You could also use your robots.txt to tell the bots to stop trying to index/re-index the dropped pages and until they do actually get dropped.

g1smd




msg:3222782
 9:20 pm on Jan 17, 2007 (gmt 0)

I see the "many to one" type of redirect as potentially flagging a site as "trying something on".

It isn't reasonable that thousands, or even just dozens, of different content pages have all been merged to now be at one single new URL.

F_Rose




msg:3223161
 5:10 am on Jan 18, 2007 (gmt 0)

g1smd,

Being that we are having difficulties to redirect non www to www, would you prefer rather show a 404 error page than redirecting to one url?

Brian




msg:3223786
 4:44 pm on Jan 18, 2007 (gmt 0)

My problem is the opposite to the familiar one here: I want to find a way to redirect from www-pages to non-www pages. My server interface lets me do it round the other way, but not the way I want.

I actually don't want to use www (if microsoft don't need them, can't see why I should).

But I don't know how!

tedster




msg:3223876
 5:36 pm on Jan 18, 2007 (gmt 0)

It doesn't matter what page you show, what matters is the http response code in the server header. But yes, I'd say a 404 would be better. Not good, mind you, but better.

Do you run your own server or at least have a dedicated hosting account? I would not suggest trusting a sigificant business site to shared Window hosting -- at least not if even one person's livelihood depends on it. Some things are worth the investment, and solid e-commerce hosting is one of them, IMO.

tedster




msg:3223887
 5:41 pm on Jan 18, 2007 (gmt 0)

Brian, check out our forum for whatever kind of server you are running, Microsoft IIS [webmasterworld.com] or Apache [webmasterworld.com].

Brian




msg:3224169
 8:52 pm on Jan 18, 2007 (gmt 0)

Hi Tedster. Thanks for that. At the Apache posts there is some text examples, but I can't make head nor tail of the relevant one. I assume I cut and past into an HT file, like I did for something else (404 I think), but I can't quite see exactly what.

Anyhow, I'm sure my query is too dumb to worry about!

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google SEO News and Discussion
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved