homepage Welcome to WebmasterWorld Guest from 23.21.34.188
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

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
jadopt1999




msg:3909525
 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?

thanks!

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

 

nealrodriguez




msg:3911212
 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"

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

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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved