homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

IIS 301 redirects and GoDaddy

5+ Year Member

Msg#: 3909938 posted 3:28 pm on May 8, 2009 (gmt 0)

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?


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



WebmasterWorld Senior Member 5+ Year Member

Msg#: 3909938 posted 6:44 pm on May 11, 2009 (gmt 0)

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"


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";

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


Global Options:
 top home search open messages active posts  

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved