# Base URL

[Base URL](/custom-apps-documentation/app-components/base/base-url.md) is the main URL to a web service that should be used for every module and remote procedure in an app, for example: `https://mywebservice.com/api/v1.`

{% hint style="info" %}
Make sure that the base URL is a **production** **endpoint** with a domain that belongs to the app itself.

Apps with development or staging URLs, or apps with a domain belonging to a cloud computing service, will not be approved.
{% endhint %}

When the service has a different domain for each user, the domain should be requested in the connection and then the value should be used in the Base tab.

## Correct Base URL examples

{% tabs %}
{% tab title="Correct" %}
An example from the Mailerlite app:

```javascript
{
    "baseUrl": "https://api.mailerlite.com/api/v2"
}
```

{% endtab %}

{% tab title="Correct (different domain)" %}
An example from the Freshsales app:

```javascript
{
    "baseUrl": "https://{{connection.domain}}.freshsales.io"
}
```

{% endtab %}
{% endtabs %}

## Incorrect Base URL examples

{% tabs %}
{% tab title="Incorrect (different domain)" %}

```javascript
{
    "baseUrl": "https://mydomain.freshsales.io"
}
```

{% hint style="info" %}
The "mydomain" should be a variable used from the Connection.
{% endhint %}
{% endtab %}

{% tab title="Incorrect (app will not be approved)" %}

```javascript
{
    "baseUrl": "https://mailerlite.heroku.com/development"
}
```

{% endtab %}
{% endtabs %}

## Using the Base URL <a href="#using-the-base-url" id="using-the-base-url"></a>

All of the modules should build on top of the `baseURL` from the Base section (starting with a forward slash `/`). It is very unlikely that a single module will need to have a completely different URL than the rest.

{% tabs %}
{% tab title="Incorrect" %}

<div align="left"><figure><img src="/files/XrFKjK1SI67iXHFahibA" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
The underlined part, which is the same for each module, should be in the Base tab.
{% endhint %}
{% endtab %}

{% tab title="Correct" %}

<div align="left"><figure><img src="/files/zLra7leuKJSmjKnS3FqN" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
Modules "url" should start with forward slash `/`
{% endhint %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.make.com/custom-apps-documentation/best-practices/base/base-url.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
