Linkchecker marking URLs invalid without www | Community
Skip to main content
New Participant
Jan 10, 2020 4:53 AM UTC
Solved

Linkchecker marking URLs invalid without www

The original authored URL is - https://example.com/hellowpage, please note there is no www here, 

However, linkechecker is checking for https://www.example.com/hellowpage. I do not want it to prefix www. 

Is there is a config/setting to switch this behaviour off and make the linkhecker valdiate only the authored links. 

*ERROR* [sling-default-3-com.day.cq.rewriter.linkchecker.impl.LinkCheckerTask.108808] com.day.cq.rewriter.linkchecker.impl.LinkCheckerTask Failed to validate URL https://www.example.com/hellowpage: java.net.UnknownHostException: www.example.com: Name or service not known

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
joerghoh
joerghohAccepted solution
Employee
Jan 13, 2020 10:05 PM UTC

The linkchecker is only recording links which are rendered as links in your pages. Thus if you encounter such a "www" domain, one of your pages is having such a link. The best way would be to crawl your site and identify the link in that format. Not sure of the originating page is listed as part of the node structure for the linkchecker.

2 replies

Umesh_Sondhi
Level 4
Jan 21, 2020 7:58 AM UTC

Hi @rahul-bapat 

Simply use the attribute x-cq-linkchecker="skip" inside the anchor tag if you want this check to be skipped.
e.g.
<a href="/skip-the-link" x-cq-linkchecker="skip">Skip Link</a>


Hope it helps 🙂

Translate
joerghoh
joerghohAccepted solution
Employee
Jan 13, 2020 10:05 PM UTC

The linkchecker is only recording links which are rendered as links in your pages. Thus if you encounter such a "www" domain, one of your pages is having such a link. The best way would be to crawl your site and identify the link in that format. Not sure of the originating page is listed as part of the node structure for the linkchecker.

Translate