Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 http://domain.com to http://www.domain.com ?
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 3

weeweeslap
Senior Member

USA
1077 Posts

Posted - 15 July 2008 :  12:34:50  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message  Reply with Quote
I run a dedicated server and for one of my domains I wish to redirect anyone that goes to http://DomainName.com to http://www.DomainName.com
How can I accomplish this?
I appreciate your help.
Thank you.
-Oscar<

coaster crazy

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 15 July 2008 :  12:45:18  Show Profile  Visit HuwR's Homepage  Reply with Quote
just add both domains to your hostheaders, no need to do redirection for that<
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 15 July 2008 :  12:55:43  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message  Reply with Quote
I have both in the host header. I just don't want them going to the non www part. Like say if you go to http://yahoo.com it automatically switches you to http://www.yahoo.com
That's what I want to do <

coaster crazy
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 15 July 2008 :  13:03:48  Show Profile  Visit leatherlips's Homepage  Reply with Quote
You could add this in the <body> of your page. I don't know if it's the best way but it will work.
<script Language="JavaScript">
location.href= ('http://www.DomainName.com');
</script>
<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

Edited by - leatherlips on 15 July 2008 13:04:34
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 15 July 2008 :  13:46:16  Show Profile  Visit HuwR's Homepage  Reply with Quote
ok, est way is to set up a website for http://domain.com on its own and then redirect it to the other website (should be an option in IIS) this will then appear to the search engines as a legitimate 301 redirect, leatherlips suggestion would appear as a 302 redirect which can cause problems for SEO.

personally I would leave it as it is, why do yo need to redirect ? makes no odds to me or search engines whether to use one or the other<
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 15 July 2008 :  14:04:00  Show Profile  Visit bobby131313's Homepage  Reply with Quote
quote:
makes no odds to me or search engines whether to use one or the other


But if both get used and indexed it can hurt you bad. It will dilute your search engine weight. Google allows you to set it now in Webmaster tools so that they will automagically convert all your weight to your choice, but the others don't, your on your own.

I have been fighting this with my forum for years and can't fix it.

Go to....

http://www.coincommunity.com/forum/ >> PR3
http://www.coincommunity.com/forum/default.asp >> PR2

Same freakin' page indexed under 2 different names, splitting PR and more importantly backlinks..... and hurting me. I went through my forum code and changes hundreds of redirects from "default.asp", still can't get them consolidated. The problem seems to be solved here, I've asked a few times how, but no one has answered that I know of.

The OP's scenario can hurt the exact same way.<

Switch the order of your title tags
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 15 July 2008 :  14:53:35  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
But if both get used and indexed it can hurt you bad

No it won't all search engines treat www.domain.com/page.ext the same as domain.com/page.ext so long as they contain the same content, it makes no difference. www.domain.com/forum/ is not a page which is why you get problems with search indexing, it is a totally different issue<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 15 July 2008 :  14:55:55  Show Profile  Visit HuwR's Homepage  Reply with Quote
sorry should have explained better, when your request for http://www.coincommunity.com/forum/ comes in, the webserver has to decide what to do, so it looks for the first available default page and redirects the browser to that it does so using a 302, that is a different issue to the one being discussed.<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 15 July 2008 :  15:02:54  Show Profile  Visit HuwR's Homepage  Reply with Quote
bobby131313, you could try this for a solution, don't know if it will work, but it might.

1) remove default.asp from the list of default files for the website, and make sure you have no other index.hem files etc, so if you tried to open /forum/ you will get an error, probably directory listing denied or something.
2) now create a custom error page to handle that error, and use that file to rewrite the headers and do a 301 redirect to default.asp

might be worth a try if you have control over IIS<
Go to Top of Page

weeweeslap
Senior Member

USA
1077 Posts

Posted - 15 July 2008 :  20:45:12  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message  Reply with Quote
Yeah that's what I wanted to prevent, SE's indexing both www and non www of the same site. Prevent penalties of duplicate content. I also use domain.com/folder/ etc for my listings on the website I wanted to do. I'll try and do what you said Huwr, I am not sure but I'll dig in there.
Thanks!<

coaster crazy
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 15 July 2008 :  21:27:49  Show Profile  Visit bobby131313's Homepage  Reply with Quote
quote:
No it won't all search engines treat www.domain.com/page.ext the same as domain.com/page.ext so long as they contain the same content, it makes no difference.


Sorry HuwR, but that's simply incorrect. That's exactly why Google lets you set it on the backend now. Because Gbot will index them as separate pages, I've seen them separate on sites with different PRs.

Thanks for the forum tip, I'll try it tomorrow and see what happens.<

Switch the order of your title tags

Edited by - bobby131313 on 16 July 2008 09:18:14
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 15 July 2008 :  23:32:24  Show Profile  Reply with Quote
quote:
Originally posted by weeweeslap

I run a dedicated server and for one of my domains I wish to redirect anyone that goes to http://DomainName.com to http://www.DomainName.com
How can I accomplish this?
I appreciate your help.
Thank you.
-Oscar



Here, try this. Save it as index.asp, change the start page to it. No matter what they type coming in, they'll go where you want them. The second bit (with the QueryString) will prevent anyone jumping straight to a page that doesn't include the www. (i.e.; http:// coincommunity.com/ cal.asp). With this in place, the URL will get modified and they'll end up at www.(url) anyway.

<%
select case Request.ServerVariables("server_name")
	case "coincommunity.com"
		If Request.ServerVariables("SERVER_PORT")=80 then
			strDesiredURL = "http://www."
			strDesiredURL = strDesiredURL & Request.ServerVariables("SERVER_NAME")
			strDesiredURL = strDesiredURL & Request.ServerVariables("URL")
			if request.Querystring <> "" then
				strDesiredURL = strDesiredURL & "?" & request.Querystring
			end if
			response.redirect("www.coincommunity.com/index.asp" target="_blank">http://www.coincommunity.com/index.asp")
		End If
	case else
		response.redirect("www.coincommunity.com/index.asp" target="_blank">http://www.coincommunity.com/index.asp")
end select
%>
<

Edited by - Carefree on 15 July 2008 23:39:21
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 16 July 2008 :  01:28:11  Show Profile  Visit SiSL's Homepage  Reply with Quote
Response.Redirect command is 301 redirect so...

if request.servervariables("server_name") = "domain.com" then response.redirect("http://www.domain.com/" & request.serverVariables("script_name"))

Having 2 domains with same content gets google angry.<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod

Edited by - SiSL on 16 July 2008 01:28:36
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 16 July 2008 :  01:56:31  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
Originally posted by bobby131313

[quote]No it won't all search engines treat www.domain.com/page.ext the same as domain.com/page.ext so long as they contain the same content, it makes no difference./quote]

Sorry HuwR, but that's simply incorrect. That's exactly why Google lets you set it on the backend now. Because Gbot will index them as separate pages, I've seen them separate on sites with different PRs.

Thanks for the forum tip, I'll try it tomorrow and see what happens.


well, if you read googles own documents on SE) it states quite clearly that they are treated and indexed as the SAME content<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 16 July 2008 :  01:58:03  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
Having 2 domains with same content gets google angry.
it may well do, but domain.com and www.domain.com are NOT DIFFERENT DOMAINS<
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 16 July 2008 :  02:00:13  Show Profile  Visit SiSL's Homepage  Reply with Quote
It does gets Google angry still HuwR, lived that --it still gets it as different hosts (x.domain.com, y.domain.com are all treated as different domains), especially notified in Google Tools to select one domain for main. One of friend got a warning and Google deleted his entire indexing to have "duplicate" content.
<

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.22 seconds. Powered By: Snitz Forums 2000 Version 3.4.07