{ Dev Farm }

Web & Windows Development

Correct Link SEO Migration from old Asp.Net WebForm to new Asp.Net Mvc Website

| 0 commenti

When you are designing a new website you have to think about old website links migration.

This is very important to avoid tons of 404 errors and losing massive traffic.

First of all you’ll have to find out all your old link. Such as


and map them to


Fortunately ASP.NET MVC made this translation quite simple.

In your global.asax (or RegisterRutes function) add the code to handle the 301 redirect

        name: "News Redirect",
        url: "news/Default.aspx",
        defaults: new { controller = "Redirect", action = "News" }

Than, I suppose you have a Redirect Controller, just convert the old link in the new website url system.

    public class RedirectController : Controller

        public ActionResult News(int? id)
            if (id > 0)
                // your code to find out your new permalink
                var permalink = "xxxxxxxxxxxxxxxxxxxx";
                // your code to find out your new permalink
                return RedirectPermanent("/News/" + permalink);
            return RedirectPermanent("/News");


RedirectPermanent function will set301 as Response Status Code.
Http Status Code 301 means “Moved Permanently”, in this way the search engine will replace the old link with the new one without losing traffic and throwing annoying¬†404 errors.

Other Resources:



Lascia un commento

I campi obbligatori sono contrassegnati con *.