Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Redirection issue on ASP .Net website

Facing issues while implementing 301 redirects

5:01 pm on Oct 9, 2013 (gmt 0)

New User

5+ Year Member

joined:Jan 30, 2013
posts: 20
votes: 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.
9:41 pm on Oct 9, 2013 (gmt 0)

Senior Member

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

joined:July 3, 2002
votes: 0

The rules that handle /default.aspx requests should be listed before the more general hostname canonicalisation rule.
10:43 am on Oct 17, 2013 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month

joined:Apr 30, 2008
votes: 191

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.
1:58 am on Oct 18, 2013 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:June 10, 2008
posts: 1130
votes: 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.