locked
Google caches Error 404 page for localized website RRS feed

  • Question

  • User-314535079 posted

    Hi,

    I have an ASP.Net(2.0) website which I have localized based on user's browser settings. So when a user navigates to my website, I check their browser settings and redirect them.

    Here's the code which I have in global.asax

    protected void Session_Start(object sender, EventArgs e)
    {          
        string localeName = ResourceHelper.GetCulture();
        string refUrl = HttpContext.Current.Request.Url.ToString();

        if (localeName.ToLower() != "en-us")
        {
            if (!refUrl.Contains("in"))
                HttpContext.Current.Response.Redirect("/in/Default.aspx");
        }
        else
        {
            if (refUrl.Contains("in"))
                HttpContext.Current.Response.Redirect("/Default.aspx");
        }
    }
     

     My problem is that on google, my 404 error page is being cached and the error page title comes up as the search result.

    I think because of the way I redirect users, the search crawler gets to the error page instead of the homepage. How can I fix this?

    Any help is appreciated. Thanks!

    Friday, May 28, 2010 2:22 PM

Answers