Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 6 of 6

Thread: Fake 404 error page

  1. #1
    medsupply is offline Senior Member
    Join Date
    Jul 2011
    Posts
    99

    Default Fake 404 error page

    Our webmaster tools account is full of messages from Google stating that our 404 not found page really does not return a 404 http header.

    We moved from another platform to ASPDNSF and are having issues with old URLs still getting indexed. It is important for Google to know that the pages do not exist so they can be removed from the index.

    I have found this article explaining how to do it and I don't think ASPDNSF handles this issue properly.

    http://weblogs.asp.net/paxer/archive...4-and-seo.aspx

    How can I fix this issue? I am not a programmer.

    Thanks!

  2. #2
    Skriver is offline Senior Member
    Join Date
    Apr 2012
    Posts
    188

    Default

    Have you built a 404 error page to redirect the page to if it's not found?

    If so then that should be ok. Following these should help

    Custom Error Pages



    Synopsis
    By modifying the web.config file, you can create custom error pages so that when errors are encountered, your customers see friendlier notices than server errors and basic 404- and 500-type errors.


    Procedure
    First, find the "customErrors mode" section of the web.config file. That can be changed to "On" (displays your custom pages to all viewers), "RemoteOnly" (displays custom errors to remote viewers, and the actual error to local viewers for debugging purposes), or "Off" (displays ugly error messages to everyone).

    You can specify the custom error page(s) in 2 ways:

    1 - A line like <customErrors mode="RemoteOnly" defaultRedirect="/error.html"/> will direct any customers who get an error to www.yoursite.com/error.html. You can create a friendly generic "an error was encountered" page to cover all issues.

    2 - You can specify a redirect page for each error type like this:

    <customErrors mode="RemoteOnly">
    <error statusCode="403" redirect="/accessdenied.html" />
    <error statusCode="404" redirect="/pagenotfound.html" />
    </customErrors mode>

  3. #3
    medsupply is offline Senior Member
    Join Date
    Jul 2011
    Posts
    99

    Default

    This is what I have:

    <customErrors mode="RemoteOnly">
    <!-- This will redirect 404 error on PageNotFound.aspx ,this will work only for file-types that IIS passes to ASP.NET -->
    <error statusCode="404" redirect="PageNotFound.aspx" />
    </customErrors>

    but that does not generate a real 404 http code but a 200.

  4. #4
    Tom Cox is offline Senior Member
    Join Date
    Nov 2009
    Location
    Los Angeles, CA
    Posts
    104

    Default

    medsupply,

    Did you ever get an answer to this "404" problem? I'm struggling with the same thing and find it hard to search through the forums because it appears I can't search on "404" or "302." I've stumbled on a few responses and found one person willing to help me out. I'm close but still can't get it quite right. I can generate a "real" 404 with our page template but the info area of the page is blank or I can generate a real 404 with a completely blank page with a brief message. Neither of these is ideal and neither seems to work properly in InternetExplorer.

    So, I'm continuing to work on this. Looks like some code changes are necessary in showproduct.aspx.cs and maybe in driver.aspx.cs.

    This seems really silly because everyone using Aspdnsf must have to delete products from time to time and if they are indexed they are generating these errors at Google which can't be good for SEO.

  5. #5
    esedirect is offline Senior Member
    Join Date
    Feb 2010
    Location
    Norfolk, UK
    Posts
    343

    Default

    For your forum search problem you want to use BFG 9000's custom search solution found in this thread.
    http://www.esedirect.co.uk
    --------------------------------------------------------------------------
    Using MS 9.2.0.0 with the following customisations:

    Lightbox/Fancybox enlarged images;
    Auto-suggest searchbox;
    Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
    Failed transactions emailed via trigger;
    Custom app to show basket contents when customer online;
    Orders pushed through to accounting systems.

    All the above without source!

  6. #6
    Tom Cox is offline Senior Member
    Join Date
    Nov 2009
    Location
    Los Angeles, CA
    Posts
    104

    Default

    That is great! Thank you very much.

    Tom