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
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 16 July 2008 :  03:05:05  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
Originally posted by SiSL

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.


In ASP a response.redirect generates a 302 not a 301<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 16 July 2008 :  03:11:07  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
Originally posted by SiSL

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.




Canonicalization is the process of picking the best url when there are several choices, and it usually refers to home pages -- www.example.com vs. example.com vs. www.example.com/index.html. Since all these urls are different, a web server could return completely different content for all the urls above. When Google “canonicalizes” a url, it tries to pick the best one and elimintes the others.

That is from Googles own guidlines

to help it choose the correct link you can add a 301 redirect, but it is not necesary and google does NOT penalise you for it.



I will say one thing however, and I have been having this argument with my hosting clients ever since I started. You really should not be pointing domain.com at your web site anyway, that is what the www part is for. if you have to point the domain root somewhere, point it at your mail servers ip instead.
<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 16 July 2008 :  03:14:05  Show Profile  Visit HuwR's Homepage  Reply with Quote
so your quickest solution to these issues is to remove domain.com from your host headers and the problem will never occur <
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 14 August 2008 :  08:53:47  Show Profile  Reply with Quote
Just to add to the options already posted, here's what I have at the top of every page:

strRServer=request.servervariables("server_name")
if strRServer<>"www.domain.tld" and strRServer<>"localhost" then
	strRQuery=request.querystring
	if len(strRQuery)>0 then strRQuery="?"&strRQuery
	response.redirect "http://www.domain.tld"&replace(request.servervariables("script_name"),"default.asp","")&strRQuery
	response.end
end if
<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”

Edited by - Shaggy on 14 August 2008 08:54:16
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 14 August 2008 :  11:17:54  Show Profile  Visit bobby131313's Homepage  Reply with Quote
quote:
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.


Took a few months but the work finally kicked in. Now it's....

http://www.coincommunity.com/forum/ >> PR4
http://www.coincommunity.com/forum/default.asp >> Greybar

Which is exactly what I'd hoped it would do. Unless there's something I'm missing, the software really should point the redirects to the directory root, not default.asp.
<

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

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 August 2008 :  11:27:34  Show Profile  Visit HuwR's Homepage  Reply with Quote
quote:
the software really should point the redirects to the directory root, not default.asp.
what software ?
if you mean Snitz then it shouldn't be redirecting you anywhere<
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 14 August 2008 :  11:57:01  Show Profile  Visit bobby131313's Homepage  Reply with Quote
Redirects and internal links in the Snitz software is what I'm talking about.

There are 207 instances of....

<a href=""default.asp"">

Which in my opinion (and I changed) should be....

<a href=""" & StrForumUrl & """>

There are also 39 instances of...

Response.Redirect("default.asp")

and 7 instances of....

strReferer = "default.asp"

There were more that I changed, but a few months later my problems are solved.<

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

bobby131313
Senior Member

USA
1163 Posts

Posted - 14 August 2008 :  12:00:48  Show Profile  Visit bobby131313's Homepage  Reply with Quote
It's really not just for Google though. It's really basic stuff, IMO (and many other experts) you should always link to the folder root to be consistent and facilitate future changes.<

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

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 August 2008 :  12:30:16  Show Profile  Visit HuwR's Homepage  Reply with Quote
not sure how you have 207 instances of <a href=""default.asp""> since there are only 78 in the base code and not once is there a link to just StrForumUrl all the forum links allways point to the forums default.asp so it is consistent.

<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 August 2008 :  12:33:46  Show Profile  Visit HuwR's Homepage  Reply with Quote
technically www.domain.com and www.domain.com/default.asp are not the same, so the forum is correct to link directly to its start file of default.asp since you may want www.domain.com to not point at default.asp but point at index.htm or even index.asp<
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 14 August 2008 :  12:40:28  Show Profile  Visit bobby131313's Homepage  Reply with Quote
I'm not going to argue with you.

If you want to go read some, you'll find that internal linking directly to the default file name is generally considered poor coding by most webmasters. Especially since 99% of the time when people link to you externally they do not use it (and you can't control it), they link to the directory only. This inconsistency results in EXACTLY what I've fixed by changing the code. Double indexing and serious SEO dilution.

The amount of links is irrelevant. Where the links point is definitely relevant.

I've fixed mine and it worked beautifully, that's all I care about.<

Switch the order of your title tags

Edited by - bobby131313 on 14 August 2008 12:41:14
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 August 2008 :  12:48:04  Show Profile  Visit HuwR's Homepage  Reply with Quote
Just remember that not everyone has the forums default.asp file as the home page of their website so pointing ALL the forum links at its default.asp is not bad coding at all, it ensures that ALL the forum links point at the forum, and the forum is totally consistant in this respect.

if you need to change it because your forum default.asp is the same as your homepage then that is entirely your choice to make those changes.<
Go to Top of Page

bobby131313
Senior Member

USA
1163 Posts

Posted - 14 August 2008 :  12:53:05  Show Profile  Visit bobby131313's Homepage  Reply with Quote
quote:
Just remember that not everyone has the forums default.asp file as the home page of their website


I never said that. But I would bet there are a very extreme few that it's not the home page of the forum directory.<

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

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 August 2008 :  13:02:04  Show Profile  Visit HuwR's Homepage  Reply with Quote
it won't necesarily fix your issue any, since Icould link to the default.asp page of your forum from here and that would have the same negative effect. you need to have proper redirection scripts to fix it correctly. just changing the links in the forum won't fix it, and don't forget you have quite a few links to default.asp?CAT_ID=XX which will also bugger up your 'fix'<
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 14 August 2008 :  13:05:55  Show Profile  Visit HuwR's Homepage  Reply with Quote
your best bet would be to leave the forum links as they were and change the default file for the forum directory under IIS to index.asp, then write an index.asp file which does a 301 redirect to default.asp then all links to the forum whether they were to / or default.asp would end up at the same url default.asp<
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | 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.13 seconds. Powered By: Snitz Forums 2000 Version 3.4.07