Welcome to WebmasterWorld Guest from 188.8.131.52
Forum Moderators: ocean10000
I need to redirect anyone typing in the http://example.com name to http://www.example.com using a 301 redirect.
I use IIS via GoDaddy economy plan. They sent me a snippet of code but give no indication on what to do with it, save to call the code snippet 'oldpage.asp' -
what oldpage? I am not changing any index.html's or anything else - obviously I cant call it 'http://example.com' -
I'm pretty much a newb when it comes to web administration. I do NOT have access to the IIS control panel, so i cannot do the redirect from there.
Any help on this?
[edited by: coopster at 3:32 pm (utc) on May 8, 2009]
[edit reason] please use example.com, thanks! [/edit]
can you send your hosting provider the following instructions?
1. Browse the website you want to do the redirect for.
2. In the right pane, right click on the file you want to redirect, and click "Properties"
3. Under the "File" tab, hit the radio selection "A redirection to a URL"
4. Put the target in the "Redirect to" textarea.
5. Make sure "The exact URL entered above" and "A permanent redirection for this resource"
if they are asp pages then the following may do:
<%@ Language=VBScript %>
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.example.com/new-page.asp"
If its ASP.NET, you would do this...
private void Page_Load(object sender, System.EventArgs e)
Response.Status = "301 Moved Permanently";
and if all else fails you may want to try switching hosting providers to an apache server or a canonical tag: