# \_links.site.href has incorrect URL in resourceapi

**URL:** <https://community.bloomreach.com/t/links-site-href-has-incorrect-url-in-resourceapi/2630>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [June 15, 2021, 7:59pm UTC](https://community.bloomreach.com/t/links-site-href-has-incorrect-url-in-resourceapi/2630 "2021-06-15T19:59:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![billy.wu](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/billy.wu/32/1943_2.png) [@billy.wu](https://community.bloomreach.com/u/billy.wu)\
**Post date:** [June 15, 2021, 7:59pm UTC](https://community.bloomreach.com/t/links-site-href-has-incorrect-url-in-resourceapi/2630/1 "2021-06-15T19:59:16Z")

</div>

Hi everyone,

Our website is using React as the frontend and call Bloomreach’s resourceapi to get the JSON objects. So I guess we are using SPA with Bloomreach’s Page Model. We are using Bloomreach 14.5.

For each content document, there is a \_links attribute. We are trying to use \_links.site.href of the main content document of that page to build the canonicalUrl. However, \_links.site.href for that document isn’t correct. It’s pointed to a sub page that also uses the same document.

So for example, we have a Retailer document that is the main document for the Retailer page. The Retailer’s \_links.site.href has the URL of “retailer/designer” instead of just “retailer”.

How does the \_links.site.href get generated? And can we change it?

Thanks,

Billy

---

<div class="post-metadata">

**Author:** ![billy.wu](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/billy.wu/32/1943_2.png) [@billy.wu](https://community.bloomreach.com/u/billy.wu)\
**Post date:** [June 17, 2021, 7:01pm UTC](https://community.bloomreach.com/t/links-site-href-has-incorrect-url-in-resourceapi/2630/2 "2021-06-17T19:01:41Z")

</div>

According to

> **[Context Aware, Canonical, Preferred and navigationStateful URLs - Bloomreach...](https://documentation.bloomreach.com/14/library/concepts/links-and-urls/context-aware-canonical-preferred-and-navigationstateful-urls.html)**
>
> Headless digital experience platform

The HST find the most suited canonical URL for the content document by using org.hippoecm.hst.core.linking.LocationMapResolver.java

Is there a way we can override and have our own LocationMapResolver for a particular content document?

Thanks,

Billy
