Hi everyone, I have a website which google shows at the non-www version . I would like to make google change it to the www version. I was trying to do 301 redirect on windows server from non-www to www with the following instructions: " Place the following code above your <html> tag or <!DOCTYPE>, if you have one: <%@ Language=VBScript %> <% response.status="301 moved permanently" Response.AddHeader "Location", "http://www.domain.com/file-location.html" %> " once I do like above , firefox tells me that the redirect doesn't seem to be ending. is there any way I can resolve this matter as soon as possible ? I already changes my preferred domain with google webmaster tools but the redirect is very important as well for google. Thank you very much.
If you do it using code then loop will not be ended and you will get error in your browser. If your host support ISAPI rewrite then you can do it easily. You may refer Redirect to www using ISAPI rewrite rule post. Kailash
my hosting is godaddy I called them , they have no answer isn't weird that such a big company doesn't know how to handle it?
here is a tool you can use to check your redirect: http://www.webconfs.com/redirect-check.php - it might help.
also try the PHP version: <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.new-url.com" ); ?>