0

I have Sitecore 8.2 update 5 site deployed in Azure PaaS as an App Service. I have created a custom domain (e.g. abc.com) in the App Service. This custom domain is kept behind F5 firewall. I am facing the problem with the item URLs, linkManager.GetItemUrl method is returning URL with App Service URL ( e.g. https://appservicename.azurewebsites.net/pagename) and not with the custom domain.

Please let me know how can i get the correct URL with custom domain name i.e. https://abc.com/pagename.

Thanks, Alok...

  • Which hostname is defined in the site definition? Can you share the site definition? – Gatogordo Jun 16 at 21:04
  • App service url is set to the targetHostName attribute in Site Definition. This is working fine if I am keeping the site behind Azure WAF firewall. Network wants to move it behind the F5 firewall. – Alok Kumar Jun 18 at 10:06
0

You should set the custom domain as targetHostName if you want that in the urls.

The targetHostName is the host name to use when generating URLs to items within this site from the context of another site. If the targetHostName attribute is absent, Sitecore uses the value of the hostName attribute instead. Used only when the value of the Rendering.SiteResolving setting is true.

https://ericastockwellalpert.wordpress.com/2018/03/26/sitecore-link-resolving-multisites-hostname-pipes-and-target-hostname/

It could be that your firewall is not sending the original domain - you could change that or fix it with the targethostname property.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.