Disable the AEM Link Checker

How to disable Link Checker

Link Checker is configured to take no action if a link is broken. In this case, how do I disable the external link checker from validating links? In doing CPU profiling and analyzing thread dumps, link checking is affecting performance, and we'd like to turn it off.

How to disable Link Checker or configure to mark links as valid in AEM

Background:  Whenever a site is loaded in AEM, the Link Checker automatically checks for the embedded links in all the content pages and marks each link as either Valid or Invalid. 

This may slow down an instance or a site due to a large number of Link Checker warnings in the log.  A decision can be made to disable some link checking.  

Note:  The Link Checker should not be enabled on publish instances.  

1. Disable link checking in the pages:

  • Add x-cq-linkchecker="valid" parameter in the <a> tag to make sure that links are always marked as valid by the Link Checker. 
  • Optionally use x-cq-linkchecker="skip" in the <a>. Link Checker will not even check for validity.  

2. Completely Disable Link Checker via the AEM Web Console:

  • Access the AEM Web Console Configuration [1].
  • Search for Day CQ Link Checker Transformer. 
  • Check the "Disable Checking" box and click Save.

3. Disable link checking for a certain domain:

  • Access the AEM Web Console Configuration [1].
  • Search for Day CQ Link Checker Transformer
  • Edit the Link Check Override Patterns parameter. 

        Example 1: ^system/

        Any external link starting with the system will not be checked.  Add additional override patterns to this section by clicking the +. 

        Example 2: ^

        This will mark all links as a valid moving forward.  

Recommended: Delete all nodes under /var/linkchecker to stop the Link Checker from rechecking URLs.  

[1] http://[host]:[port]/system/console/configMgr



If you use service.special_link_patterns, then the Link Checker still checks the URL to see if it is valid in terms of the characters and structure.

Adding this code in your page component jsp prevents external link checking from being done by calling LinkCheckerSettings.fromRequest(slingRequest).setIgnoreExternals(true).  In most cases, you would only implement it on publish instances, not author.  So here is some code to demonstrate:

org.apache.sling.runmode.RunMode runmode = sling.getService(org.apache.sling.runmode.RunMode.class);
String[] runmodes = runmode.getCurrentRunModes();
boolean isPublish = false;
String [] expectedRunModes = {"publish"};
if(runmode.isActive(expectedRunModes)) {
isPublish = true;

if(isPublish) {
LinkCheckerSettings s = LinkCheckerSettings.fromRequest(slingRequest);

If you only want to disable the link checking for a specific component or part of the page, then you can re-enable it again with this code:

Logo Adobe

Prihláste sa do svojho účtu