SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Threaded View

  1. #1
    SitePoint Addict betrollwin.com's Avatar
    Join Date
    Nov 2005
    Posts
    213
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IIS Custom 404 Page Gives 200 Response Code

    I'm working on a website that uses IIS and needs a custom 404 page created. I made 404.aspx and added the following code to my web.config file

    Code:
    <customErrors mode="On" redirectMode="ResponseRewrite">
    	<error statusCode="404" redirect="404.aspx"/>
    </customErrors>
    It does work (nonexistantpage.aspx shows the contents of 404.aspx) but when I check the header response code, I see a 200 instead of a 404 (a big SEO no-no). Any ideas on how I make it show the correct error response code?

    Thanks
    Last edited by ParkinT; Jan 3, 2013 at 12:19. Reason: Corrected Thread Title


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •