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

Microsoft IIS Web Server and ASP.NET Forum

Redirection issue on ASP .Net website
Facing issues while implementing 301 redirects

Msg#: 4615664 posted 5:01 pm on Oct 9, 2013 (gmt 0)

I have a website developed using NopCommerce (ASP .Net)

I have an issue implementing 301 redirect. I have used global.asax for implementing 301 redirects and all redirects are working properly except the one mentioned below:

www.ABC.com --302--> www.ABC.com/default.aspx

The problem here is that I recently had a domain migration from ABC to XYZ so my redirect chain is like

www.ABC.com --302--> www.ABC.com/default.aspx --301--> www.XYZ.com --302--> www.XYZ.com/default.aspx

From an SEO perspective, it needs to be in the following way:

www.ABC.com/ --301--> www.XYZ.com/
www.ABC.com/default.aspx --301--> www.XYZ.com/
www.XYZ.com/default.aspx --301--> www.XYZ.com/

Please help.



WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Msg#: 4615664 posted 9:41 pm on Oct 9, 2013 (gmt 0)

The rules that handle /default.aspx requests should be listed before the more general hostname canonicalisation rule.


WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

Msg#: 4615664 posted 10:43 am on Oct 17, 2013 (gmt 0)

Have you checked your web.config to see if there is some rule in there with regards to default.aspx that gets executed BEFORE your handling of default.aspx redirect in global.asax?

The fact that your new domain also performs 302 to default.aspx seems to confirm this.


WebmasterWorld Senior Member 5+ Year Member

Msg#: 4615664 posted 1:58 am on Oct 18, 2013 (gmt 0)

General rule of thumb, you should do 301 redirects in the web.config. It's really easy to do.

Here's a sample
<location path="services.htm">
<httpRedirect enabled="true" destination="http://domain.com/services" httpResponseStatus="Permanent" />
<location path="products.htm">
<httpRedirect enabled="true" destination="http://domain.com/products" httpResponseStatus="Permanent" />

Make sure those location tags go inside your configuration tags, if they already exist.

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