Link Checker marking otherwise working URLs as invalid
When the AEM link checker is marking otherwise working URLs as invalid and the links to the pages is getting a 404 error, follow the instructions given in this article to resolve the issue.
Description
Environment
Adobe Experience Manager 6.5
Issue
Link Checker marks working URLs as invalid.
So, the links to the pages appear as broken.
AEM Link Checker is getting a 404 error response when attempting to connect to the specific URLs, which are otherwise working. The 404 error message will look similar to this:
20.05.2020 17:53:07.783 *INFO* [ sling-default-2-com.day.cq.rewriter.linkchecker.impl.LinkCheckerTask.299567] com.day.cq.rewriter.linkchecker.impl.LinkCheckerTask Checked URL https://abc.xyz.com/def-efg: 404 (invalid)
Cause
If you check these URLs in an online tool (For example: https://reqbin.com/) that can submit HEAD
requests, and if you get a 404 error response, the Link Checker (from AEM 6.5 onwards) is working as designed.
Until the AEM 6.4 release, the Link Checker would make both a HEAD
and GET
request when validating links.
This behavior was changed in AEM 6.5 to address a critical security vulnerability (CQ-4259662 | SSRF in the Link Checker).
Hence from AEM 6.5 onwards, the Link Checker will only submit HEAD
requests.
Resolution
If you are sure, you still want the URLs to be marked as valid, and the links on the pages to work, you can follow these steps:
- Go to
/system/console/configMgr
. - Search for the config: Day CQ Link Checker Service and edit. See the screenshot below:
- Add a regular expression value to the Link Check Override Patterns. The URLs that match this pattern won’t be checked by the Link Checker, (but must be a valid URL anyways). Example:
https://abc\.xyz\.com/
. - You can also read these articles for more options: How to disable Link Checker or configure to mark links as valid in AEM in the Knowledge Articles in Adobe Experience League and AEM Link Checker : Comprehensive Guide in the AEM Blog.