This week, Helen Grimbly, Support Lead at Sitemorse has been looking at the importance of setting up the correct status codes on a web page.
Helen Grimbly, Support Lead
Every web page visited returns a status code which provides the browser with additional information about that page. It's important for error pages to have the correct status code, not least because they are used by search engines to decide whether or not to index a page.
Occasionally we have had a support query where there is, for example, a Code Quality (HTML) error on a URL that appears to be an image file (e.g example.jpg), but further investigation has found that the supposed image file was missing on the server which therefore responded with an HTML error page but failed to set the correct ‘404 Not Found’ status code. Sitemorse therefore assesses the HTML file and cannot report the broken link.
For example, if a file when viewed displays a message such as 'We couldn't find that page', but the status code returned is 200 success status, this will impact Search Engines and Sitemorse's assessment of that page. The Search engine will handle the error page as though it were a successful page. Sitemorse will attempt to assess the page as working and may raise issues due to the broken image being assessed as a successful HTML file.
So if you have a Code Quality (HTML) error found on what you think is an image, open the URL and check what a browser displays. Then check the status code returned for that URL, as shown in a previous blog under the section heading 'Check the status code': https://sitemorse.com/news/2018/12/06/tech-update-404-status-file-not-found/ - if it returns 200, then the server needs to be reconfigured to return the correct code.