External links with .aspx extensions labelled as invalid even after adding check_override_pattern in Linkchecker to skip .aspx links | Community
Skip to main content
Level 1
June 10, 2026
Solved

External links with .aspx extensions labelled as invalid even after adding check_override_pattern in Linkchecker to skip .aspx links

  • June 10, 2026
  • 4 replies
  • 84 views

 I’ve been facing an issue in RTE where the links with .aspx extensions were flagged as invalid by linkchecker. 
Hence I added a override pattern in com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl.cfg.json with the below pattern:

"service.check_override_patterns": [
  "^system/",
  "^.*\\.aspx(?:$|[?#].*)"
]
Note: “^system/” was added as default.
Even after this change, the .aspx links are still getting flagged as invalid in the linkchecker even though they are valid web pages. 
How can I fix this?

Best answer by kapil_rajoria

Hi ​@Dayana12 ,
1. Could you please provide an example url? Also, verify it.The override pattern is matched against the complete URL string passed to LinkChecker. If the stored value differs from what your regex expects, it won't match.
2. Check the com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl configuration in /system/console/configMgr, if your pattern actually got applied. Sometimes the deployed .cfg.json isn't picked up due to runmode mismatches.
3. Check this configuration also: com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformerFactory
4. Try 
"service.check_override_patterns": [
  "^system/",
  ".*\\.aspx($|\\?.*|#.*)"
]


or a simpler one
".*\\.aspx.*"  

just to verify pattern is being reached.
5. Check cached results, AEM stores link validation results under: /var/linkchecker in crxde If the URL was previously marked invalid, the cached status may remain under the given path. Try deleting it. Then restart the link checker service or instance.

If none of the above work, please let me know.
Thanks

4 replies

konstantyn_diachenko
Community Advisor
Community Advisor
June 10, 2026

Hi ​@Dayana12 ,

 

The regex you configured is correct, but the Link Checker behaviour is multi-stage and stateful.

First, make sure the regex is properly escaped (\\.aspx in JSON, \.aspx in ConfigMgr).
Then clear /var/linkchecker, as existing invalid entries are cached and won’t be re-evaluated automatically.

Also note that override patterns don’t always bypass external link validation fully. For .aspx external URLs, AEM may still attempt availability checks and mark them invalid.

I’d recommend (just for testing purpose) to try to add some of the following attributes around your anchor in the HTML mode in the RTE:

  • x-cq-linkchecker="valid" or
  • x-cq-linkchecker="skip"

This guarantees the links won’t be flagged regardless of Link Checker behaviour.

Additionally, you can check the following articles:

Kostiantyn Diachenko, Community Advisor, Certified Senior AEM Developer, creator of free AEM VLT Tool, maintainer of AEM Tools plugin.
kapil_rajoria
Community Advisor
kapil_rajoriaCommunity AdvisorAccepted solution
Community Advisor
June 11, 2026

Hi ​@Dayana12 ,
1. Could you please provide an example url? Also, verify it.The override pattern is matched against the complete URL string passed to LinkChecker. If the stored value differs from what your regex expects, it won't match.
2. Check the com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl configuration in /system/console/configMgr, if your pattern actually got applied. Sometimes the deployed .cfg.json isn't picked up due to runmode mismatches.
3. Check this configuration also: com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformerFactory
4. Try 
"service.check_override_patterns": [
  "^system/",
  ".*\\.aspx($|\\?.*|#.*)"
]


or a simpler one
".*\\.aspx.*"  

just to verify pattern is being reached.
5. Check cached results, AEM stores link validation results under: /var/linkchecker in crxde If the URL was previously marked invalid, the cached status may remain under the given path. Try deleting it. Then restart the link checker service or instance.

If none of the above work, please let me know.
Thanks

Level 4
June 11, 2026

Hi ​@Dayana12,

 

The two existing answers cover the mechanics well. One thing worth adding that explains why the override pattern often doesn’t work as expected:

 

check_override_patterns controls which links the LinkCheckerTransformer rewrites (i.e., marks as invalid in rendered HTML) it doesn’t suppress the background scheduled availability check that runs independently. So even with a correct pattern, AEM’s async checker can still flag the link as bad in its internal state.

 

The cleanest fix for .aspx links specifically is forcing the outcome at the link level rather than fighting the pattern matching:

 

<a href="https://example.com/page.aspx" x-cq-linkchecker="skip">...</a>
 

skip = don’t check or rewrite. valid = treat as valid without checking. Both survive the background checker.

 

If you have many .aspx links across content and can’t touch each one, the most reliable config-level approach is LinkCheckerTransformerFactory → set checkRewrittenLinks to false, which stops the transformer from acting on links matching your override pattern even if the background checker has flagged them.

 

Also worth confirming: after any config change, delete /var/linkchecker in CRXDE and restart the Day CQ Link Checker Service, stale cached state will keep flagging links regardless of your new pattern.

Dayana12Author
Level 1
June 14, 2026

Hi All,
The particular link was not working because of a trailing /. Fixed the override pattern and the issue is resolved.
Thanks for the inputs.