If a site just returns 401 or similar status codes, then of course it isn't valid html5. That Warning should only be shown if the content length is >0 and/or if it's html at all.
Alternatively, it could be checked what's the expected content type; for example verify it's valid json for application/json...
## HTTPS content scan results
Compression is not enabled
invalid html5: First non-comment node must be the doctype node, found html
HTML size: 0kB
Total download size (without media): 0kB
If a site just returns 401 or similar status codes, then of course it isn't valid html5. That Warning should only be shown if the content length is >0 and/or if it's html at all. Alternatively, it could be checked what's the expected content type; for example verify it's valid json for
application/json
...