How do I canonicalize a non www version to the www version of the site...I tried using this: http://sitename.com: <%@ Language=VBScript %> <% Response.Status=â€301 Moved Permanently†Response.AddHeader “Locationâ€, http://www.sitename.com %> Code (markup): but that did not work. All I got was some asp error. Also, where do I put the code? I put it in the homepages default.aspx file and also tried putting it in the head of the document but neither worked. I have never worked with an ASP site before so I am really clueless on this one. Can someone help me out? Thank you.
Do you have your own dedicated server? If so install and isapi rewrite (helicontech.com), it can handle Canonicalized urls as well as create SEO friendly URLs. Once installed just page the following code into the httpd.ini file RewriteCond %HTTPS off RewriteCond Host: (?!www\.)[^.]+\.[^.]+ RewriteRule (.*) http\://www.example.com$1 [I,RP] Code (markup): If you dont have a dedicated server check with your hosting company and see if they support any isapi rewrite filters. Hope this helps!