Hey guys can you please provide me with the right code for making a 301 redirect from index.asp to root domain (/) for example: www. domain .com/index.asp to www . domain . com thanks!
you may need to create a default page for example default.asp instead of using index.asp so you may able to redirect from www. domain .com/index.asp to www . domain . com put the following asp code to the top page of index.asp <% Response.Status="301 Moved Permanently" Response.AddHeader "Location","http:// www . domain . com /" %>
have you went to CP to setup [default.asp] as the first priority default page [index.asp] can be the second priority? 302 <%response.redirect "http:// www domain com"%>
that's what I have done: I made a copy of index.asp , and called him default.asp I took the original index.asp , and placed the first code you gave me. uploaded both to the server the result: index.asp is redirecting 301 to root domain name. question: there is still duplicate - www.domainname.com/default.asp and www.domainname.com what can I do ? Thank for you help sir.
another comment: when typing domainname.com it redirects you to www.domainname.com/default.asp and not to www.domainname.com thanks
It is easy. Do not worry it. There is no duplication problem. You blank index.asp but only keep 301 header, because redirect is before all reading.
so it's all set and done now ? what I have done was okay? "You blank index.asp but only keep 301 header, because redirect is before all reading. " I am afraid I don't understand that part. would you please explain? thank you very much.
YSeo you did well keep this header part on the top of index.asp <% Response.Status="301 Moved Permanently" Response.AddHeader "Location","http:// www . domain . com /" %> Yes, you did fine already, since the page been relocated to a new place by 301, therefore SEs only be able to crawl new page's body. Regards,