Question

For SEO reasons we are about to face a major refactoring for a ASP.NET website. To please SEO engines most of .aspx pages will be renamed. The problem is that these pages are referenced all over the web and we absolutely need to avoid to break these links, nor the SEO ranking boost that comes from these links.

Three questions:

A) Is there a common way to handle this?

B) I'd like to centralize in a C# file or an ASP.NET or IIS config file, a redirection table, something defined like:

{ "Page1OldName.aspx", "Page1NewName.aspx" } 
{ "Page2OldName.aspx", "Page2NewName.aspx" } 
{ "Page3OldName.aspx", "Page3NewName.aspx" } 
...

I am aware of the Response.Redirect() method. I can imagine an ugly way to intercept page-not-found error and then use Response.Redirect() coupled with the redirection table, but it doesn't look clean. Is there a cleaner way?

C) Do such redirection could/will provoke SEO ranking penalty?

Was it helpful?

Solution

you can try to use UrlMapping in webconfig. Test001 is the old url. Test002 is the new.

<system.web>
        <urlMappings>
          <add url="~/test001.aspx" mappedUrl="~/test002.aspx" />
        </urlMappings>
    </system.web>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top