Dotcom-Monitor allows users to customize their website monitoring by specifying expected HTTP response codes. This ensures that the system correctly interprets responses based on your unique needs, rather than just treating all non-200 responses as failures.

By default, Dotcom-Monitor expects HTTP responses with status codes within the 200-399 range to confirm that a webpage is functioning properly and a monitoring request succeeded. However, in some cases, other status codes might also indicate an expected outcome. If an HTTP response contains an expected status code provided by a user, Dotcom-Monitor will consider the request successful, even if the code is not in the default 200-399 success range.

How to Set Up Monitoring for Specific HTTP Codes

  1. Open your HTTP(S) monitoring target settings.
  2. Under the Basic tab, in the Expected response codes field, enter the status codes you want the system to recognize as successful responses.

Dotcom-Monitor allows you to enter multiple HTTP response codes or define a range of acceptable codes.

Examples:

  • To allow multiple expected responses, such as 401 Unauthorized and 500 Internal Server Error, enter:
    401, 500
  • To allow all 5xx server error responses, enter:
    500-599

For example, you want to monitor a restricted webpage that should only be accessible to authorized users. When an unauthorized user tries to visit this page, the server should return an HTTP 401 Unauthorized status code.

  • To verify that unauthorized users can’t access the target page, enter 401 in the Expected response codes field.
  • If Dotcom-Monitor receives a 401 response, it will mark the monitoring request as successful.
  • If the response is anything else (e.g., 200 OK, meaning access was granted unexpectedly), an error will be generated and reflected in monitoring reports.