Expand my Community achievements bar.

SOLVED

Linkchecker marking URLs invalid without www

Avatar

Level 1

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

 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

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.

View solution in original post

2 Replies

Avatar

Correct answer by
Employee Advisor

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.

Avatar

Level 5

Hi @RahulBapat 

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