Welcome to WebmasterWorld Guest from 54.167.185.18

Forum Moderators: ocean10000

Message Too Old, No Replies

IIS 301 redirects and GoDaddy

   
3:28 pm on May 8, 2009 (gmt 0)

5+ Year Member



hi folks

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?

thanks!

[edited by: coopster at 3:32 pm (utc) on May 8, 2009]
[edit reason] please use example.com, thanks! [/edit]

6:44 pm on May 11, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



welcome to WebmasterWorld, jadopt1999!

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"

[webmasterworld.com...]

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...

<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.example.com/new-page.asp");
}
</script>

and if all else fails you may want to try switching hosting providers to an apache server or a canonical tag:

[googlewebmastercentral.blogspot.com...]