Speed
Fix the address that returns an error
The address returned an error code instead of the page, so anyone following that link sees an error rather than your content.
Why it matters
An error page loses the visitor immediately, and if the address is one you advertise or link to, search engines record the failure as well. The first digit of the code tells you where the fault is: a 4xx code means the request was for something that is not there, and a 5xx code means your server or application failed while trying to answer.
How you would notice it
- A link from your site, an advert, or a directory leads to a page saying it was not found.
- Visitors report the site being down while other pages work normally.
- Search results show an old address that no longer exists.
What to do
Stage 1
- Confirm which address failed and read the exact code it returns.
Check the exact spelling, including the trailing slash and the www version, because one spelling can work while the other fails.
curl -I https://yourdomain.com/that-pageStage 2
- For a 404, decide whether the page should exist. If it should, restore it or correct the link that points at it. If it moved, redirect the old address to the new one.
# nginx
location = /old-page { return 301 /new-page; }Stage 3
- For a 401 or 403, check whether a directory permission, a password rule, or a firewall rule is refusing ordinary visitors as well as you.
These appear most often after a change of host, because file permissions do not always survive the move intact.
- For a 5xx, read your host error log for the time the failure happened. The log names the failing file or service.
These failures are often intermittent, so fixing the line the log names is what stops them coming back.
- Add a friendly error page so that a mistyped address still gives the visitor somewhere to go.
Keep the friendly page returning a 404 status. A friendly page that returns 200 hides the failure from visitors and from search engines, and it does not pass this check.
How to check it worked
Confirm it worked
Request the address with the header check again and confirm it now returns 200, or redirects to an address that returns 200. Then open it in a browser and confirm you see your content rather than an error message. Re-run the Siege Test and confirm the status code recommendation is gone.