Gravatar for gaur.arun777@gmail.com

Question by Arun Sharma, Feb 13, 2019 2:39 AM

Coveo sitecore sxa not resolve hostname instead getting IP address?

Hi All,

I am using Coveo for Sitecore sxa, as we used sxa for creating multiple website there is Site Grouping setting on that we pass the hostname that is working fine in all cases expect coveo. As the URL of the search results item holding IP address instead of hostname. Anyone facing the same issue. If yes then anyone can tell the solution for the

1 Reply
Gravatar for flguillemette@coveo.com

Answer by François Lachance-Guillemette, Feb 13, 2019 6:58 PM

The way clickableUri is computed is explained in this article here: Understanding How The ClickableUri Value Is Computed

Basically, Coveo for Sitecore gets the site in which the item is included, calls Sitecore's LinkManager with this site, take the URL and replaces the "server" part of the URL by the `serverUrl` setting and assign it to the document. The result is a clickableUri that actually makes sense.

Then, at query time, the `ResolveResultClickableUriProcessor` takes this clickableUri and updates it depending on the site currently being visited.

This means that there are a couple of point of failures to check if you get an IP in your results:

  1. LinkManager: A custom link manager that would provide IPs instead of server URLs
  2. Site configuration: An IP as the `targetHostName`, which would be used in the LinkManager.
  3. ServerUrl node: An IP in the serverUrl node. Coveo for Sitecore would replace the URL with that
  4. A custom `coveoProcessParsedRestResponse` processor that replaces `ResolveResultClickableUriProcessor`: A custom implementation that would return the IP instead of the URL

You have to figure out the source of this, but most of the time, these issue come up by custom code or misconfiguration.

Ask a question