skip to Main Content

I own multiple domains and wanna promote them pointing to one ASP.NET WebForms application.
But duplicate content is either  ignored, or even worse, penalized, by the search engine algorithm.
Google recommends using 301 redirects to standardize URLs. 

How to implement this using ASP.NET?

2

Answers


  1. If you are using .NET framework 4.0 or above you can do:

    protected void Page_Load(object sender, System.EventArgs e)
    {
        Response.RedirectPermanent("http://www.redirectsite.com/");
    }
    

    For earlier version you can use:

    protected void Page_Load(object sender, System.EventArgs e)
    {
        Response.Status = "301 Moved Permanently";
        Response.AddHeader("Location","http://www.redirectsite.com/");
    }
    
    Login or Signup to reply.
  2. Since the content is identical, i would suggest using rel=canonical. 301 is to indicate that the resource has moved permanently which is not the case here. you should be using rel=”canonical”.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search