Hide IIS version when user gets error HTTP Error 404.0 - Not Found and view source file from webbrowser

Mehul Donga 0 Reputation points
2025-01-29T07:46:31.4966667+00:00

When user load the page with wrong url or type wrong path to the file in url then user get error with below message in web browser.

" HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."

Now if user right click and select View Page Source from the context menu then user can see IIS version in response headers. This is for IIS 10

IIS

Is there any way to hide IIS version title tag.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,582 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. XuDong Peng-MSFT 11,176 Reputation points Microsoft Vendor
    2025-01-29T10:27:39.0633333+00:00

    Hi @Mehul Donga,

    Is there any way to hide IIS version title tag.

    Usually we can remove the IIS version with removeServerHeader in system.webServer/security/requestFiltering. But the content mentioned in your question is caused by errorMode="Detailed".

    You can view the basic error pages in Error Pages, like these:User's image

    After the above configuration, the IIS server will generate other information (including the content of the header/title) in Response section of browser devtools.

    So if you need to hide this part of the content, you need to use a custom error page (or use errorMode="DetailedLocalOnly").

    User's image

    Best Regards,

    Xudong Peng


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.