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)

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)

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

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)

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month

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)

WebmasterWorld Senior Member 5+ Year Member

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.

Featured Threads

Hot Threads This Week

Hot Threads This Month