Hello All
I am new here and have a rather painful question. I have searched and searched for the answer.
I have a site that is about 1 year old. Despite all my best efforts and many errors it ranks #50 to 70 for my main key words but pages 1, 2 or 3 for most of my secondary.
I have had many double indexing problems from the beginning some from linking errors, etc. One problem has occurred because my demo store contained links that link to the hosts server pages.
I am indexed as
www.mydomain.com as well as
www.mydomain.myhostsname.com. The host address is in the supplemental index in google but in MSN some of those pages actually rank higher than my .com pages.
My Windows IIS host said that they would put in some kind of no follow code but I constantly keep getting linked to by these google ad pages that are linking the the hostname address. I still have my entire site indexed under both domains.
Does this make sense to you? The platform is template style. I do have access to the template html files but not the .asp files.
I found the following code to use regarding the www vs non www version pages (which I also have a problem with but only in MSN as far as I know)
I need some sort of asp rewrite that will address both issues.
Dim Domain_Name, theURL, QUERY_STRING, HTTP_PATH
Domain_Name = lcase(request.ServerVariables("HTTP_HOST"))
if domain_name <> "www.example.com" Then
HTTP_PATH = request.ServerVariables("PATH_INFO")
If Left(HTTP_PATH,

= "/default" Then
HTTP_PATH = ""
End If
QUERY_STRING = request.ServerVariables("QUERY_STRING")
theURL = "http://www.example.com" & HTTP_PATH
if len(QUERY_STRING) > 0 Then
theURL = theURL & "?" & QUERY_STRING
end if
Response.Clear
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", theURL
Response.Flush
Response.End
end if
As I said host used Windows IIS so you cannot use an htaccess file. This code is to be saved as a file named "redirect.asp" and then added to the top of each file on the site with the following snippet:
<!-- #Include file="redirect.asp" -->
Does anyone know of such a code. I want it to be safe. I can't seem to get rid of these stupid duplicate addresses. My host does not have a rewrite ini file.
Thanks in advance for your input.
Bomy