I've got this odd issue with our Sitecore 10.2 with SXA implementation. I have a site definition that has multiple host names associated with it. On occasion, the links on the site will include the hostname of something other than the hostname you are browsing the site under. I'll give the specifics below.
SXA Site definition has the following for hostnames field:
sitea.mysite.com
sitea-staging.mysite.com
nameofappservice.azurewebsites.net
All the hostnames are supposed to hit the same site and are used for different purposes between external production, staging slot, or azure healthcheck.
Sometimes when browsing the site via sitea.mysite.com
, after clicking around some of the links will display with the hostname of the nameofappservice.azurewebsites.net
or sitea-staging.mysite.com
instead of using sitea.mysite.com
. These are all Sitecore generated links via LinkManager
.
If I browse the site through sitea.mysite.com
, I should only be seeing links that are using sitea.mysite.com
as the domain. I'm not sure why the other domains are being output to the page for the links.
Both Sitea.mysite.com
and nameofappservice.azurewebsites.net
point to the same azure CD app service. sitea-staging.mysite.com
points to the CD app service staging slot (for blue/green deployments).
Most of the time, I am seeing issues with nameofappservice.azurewebsites.net
showing up in the links. The reason I even have this as a valid hostname for the site is to allow Azure Healthcheck to correctly ping the instances of the app service for uptime. This was a hostname gotcha that I found in this article - https://benrichardson.uk/2020/01/22/health-monitoring-of-azure-web-apps-with-sitecore/
vary by
options?