# Why does the descriptor need baseUrl?

**URL:** <https://community.developer.atlassian.com/t/why-does-the-descriptor-need-baseurl/54369>\
**Category:** Confluence Cloud\
**Tags:** connect-descriptor, base-url, atlassian-connect\
**Created:** [December 12, 2021, 11:54am UTC](https://community.developer.atlassian.com/t/why-does-the-descriptor-need-baseurl/54369 "2021-12-12T11:54:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![eagle.xiao](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/eagle.xiao/32/48921_2.png) [@eagle.xiao](https://community.developer.atlassian.com/u/eagle.xiao)\
**Post date:** [December 12, 2021, 11:54am UTC](https://community.developer.atlassian.com/t/why-does-the-descriptor-need-baseurl/54369/1 "2021-12-12T11:54:10Z")

</div>

There is a “baseUrl” field in the descriptor. In our (I guess almost everyone?) case, the baseUrl is the same as the origin of the descriptor or a relative path to the same origin.

For example, if the descriptor is at “[https://example.com/descriptor](https://example.com/descriptor)” then the baseUrl would be “[https://example.com/relative/path](https://example.com/relative/path)”.

Why do we have to repeat origin ([https://example.com](https://example.com)) here? Are there any concerns if we just give baseUrl as “/relative/path” and let the platform deduce the origin?

In fact, our backend that serves the descriptor does the same under the hood.

---

<div class="post-metadata">

**Author:** ![ibuchanan](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/ibuchanan/32/35815_2.png) [@ibuchanan](https://community.developer.atlassian.com/u/ibuchanan)\
**Post date:** [December 13, 2021, 1:18pm UTC](https://community.developer.atlassian.com/t/why-does-the-descriptor-need-baseurl/54369/2 "2021-12-13T13:18:27Z")

</div>

@eagle.xiao,

I cannot answer for why the platform works the way it does so I can only offer a practical point. Connect simply will not accept a relative URL as the `baseUrl`. The docs may not explain well but they do clearly specify:

> The baseUrl must start with https:// to ensure that all data is sent securely between our cloud instances and your app.  
> Note: each app must have a unique baseUrl. If you would like to serve multiple apps from the same host, consider adding a path prefix into the baseUrl.

Relative URLs can’t start with a protocol and would not be unique.

---

<div class="post-metadata">

**Author:** ![eagle.xiao](https://sea1.discourse-cdn.com/atlassiandeveloper/user_avatar/community.developer.atlassian.com/eagle.xiao/32/48921_2.png) [@eagle.xiao](https://community.developer.atlassian.com/u/eagle.xiao)\
**Post date:** [December 13, 2021, 9:43pm UTC](https://community.developer.atlassian.com/t/why-does-the-descriptor-need-baseurl/54369/3 "2021-12-13T21:43:53Z")

</div>

Thanks, @ibuchanan for your reply. I have read the docs. This is more to:

1. Understand the rationality behind the design;
2. Maybe **a feature request** to make protocol and domain **optional** from baseUrl.

If we check the ACE implementation, we will notice that ACE also dynamically generates the baseUrl. [Bitbucket](https://bitbucket.org/atlassian/atlassian-connect-express/src/4540f56c69f067e93351ece1a2a091c745c1322d/test/atlassian-connect.json?at=master#lines-16)
