homepage Welcome to WebmasterWorld Guest from 54.198.139.141
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

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
SEOMa3




msg:4615666
 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.

 

g1smd




msg:4615734
 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.

aakk9999




msg:4617321
 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.

andrewsmd




msg:4617566
 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
<configuration>
<location path="services.htm">
<system.webServer>
<httpRedirect enabled="true" destination="http://domain.com/services" httpResponseStatus="Permanent" />
</system.webServer>
</location>
<location path="products.htm">
<system.webServer>
<httpRedirect enabled="true" destination="http://domain.com/products" httpResponseStatus="Permanent" />
</system.webServer>
</location>
</configuration>

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