Site Returns 200 OK but Shows an Error

Broken pages invisible to classic HTTP monitoring

It's one of the most frustrating web monitoring traps: your monitoring tool indicates "UP" and "200 OK", but your users see a blank page, an error message, or incorrect content. The HTTP server considers it responded successfully, even if what it served is unusable.

This problem occurs because HTTP codes describe the success of transmission, not the validity of business content. A nicely displayed PHP error page, a maintenance page, or even a completely empty page can all return a 200 code. Classic HTTP monitoring is blind to these situations.

The solution is content verification: instead of only checking the HTTP code, you also verify that critical elements are present in the response. MoniTao makes it easy to configure this verification to detect invisible broken pages.

Symptoms of a failing 200 page

Here are the signs that your site returns 200 but has a problem:

Common causes of the 200-but-error problem

Several situations can cause this gap between HTTP code and actual content:

Diagnosing the problem

Identifying and fixing these situations invisible to classic monitoring:

Content verification configuration example

Here's how to verify that expected content is present on your page:

# With curl - verify text is present
curl -s https://example.com | grep -q "Add to cart" && echo "OK" || echo "FAIL"

# Verify minimum response size
SIZE=$(curl -s https://example.com | wc -c)
[ $SIZE -gt 1000 ] && echo "OK: $SIZE bytes" || echo "FAIL: page too small"

# Basic monitoring script
#!/bin/bash
RESPONSE=$(curl -s https://example.com)

if echo "$RESPONSE" | grep -q "My Site"; then
    echo "Content check: PASS"
else
    echo "Content check: FAIL - keyword missing"
    # Send alert
fi

These examples show the basic principle. MoniTao automates this verification with a simple interface: configure the text to search for, and receive an alert if the text disappears.

Automatic detection with MoniTao

MoniTao goes beyond simple HTTP code to detect real outages:

Setup checklist

  • Identify critical pages to monitor (home, checkout, login)
  • List elements that MUST be present on each page
  • Configure content verification in MoniTao
  • Test by temporarily removing the element (should trigger alert)
  • Document the verification texts used
  • Periodically review if texts are still relevant

Frequently asked questions

Why does the server return 200 if the page is in error?

HTTP codes describe communication success, not business content validity. If the server received the request and sent a response (even an error page), it's technically an HTTP success.

What text should I choose for content validation?

Choose a static and critical element: your site name, a footer text present on all pages, a main action button. Avoid dates, prices or dynamic content.

Does content verification slow down monitoring?

No, verification is done on the already received response. It doesn't add an extra request, just a text search in the existing response.

Can I monitor multiple elements on the same page?

With MoniTao, you can create multiple monitors for the same URL with different verifications, or use regular expressions for more complex patterns.

My CDN caches pages. Does verification work?

Yes, this is actually an important use case. If the CDN serves a corrupted or stale cached version, content verification will detect that the expected text is no longer present.

How to handle multilingual pages?

Create a monitor per language with the appropriate text in each language. Or use a technical element present in all versions (specific HTML tag, data-attribute).

Beyond the HTTP code

HTTP code 200 means "successful transmission", not "functional page". This distinction is crucial for effective monitoring. Without content verification, you can have a broken site for hours with monitoring indicating "all good".

MoniTao lets you easily configure content verifications to detect these invisible outages. Identify your critical pages, choose the elements to monitor, and sleep soundly knowing you'll be alerted if something important disappears.

Ready to Sleep Soundly?

Start free, no credit card required.