Sometimes the broken links in the link validation job are not actually broken. You can open the link in the browser without a problem.
The reason it shows as broken is that CmsCore uses a HEAD request to ping the external URL and to test for its validity. Even if one can open the link in the browser (which is a GET request), the server may still block HEAD requests. If the HEAD requests are blocked, the link validation job will report the links as invalid.
The steps below will allow someone to check the link.
- Open Postman app
- Enter the URL
- Set the request method to HEAD
- In the Headers tab, add the User-Agent header to "EPiServer Link Checker".
- Click send.
If the result returns 403/404, It means that the link is not configured to be checked by other systems. Hence the linkValidation job reports it as broken.
We can add a linkValidator node as a child to the <episerver> node of the web.config. Use regex in linkValidator to exclude these links from showing up in the broken link report.
Here is the syntax: