# Backend URL Configuration

The SDK provides flexibility in configuring the backend URLs used for API calls. By default, the SDK uses a predefined set of URLs, but you can customize this behavior to suit your application's needs.

## Default URL Behavior <a href="#default-url-behavior" id="default-url-behavior"></a>

Out of the box, the SDK follows this URL precedence:

1. URLs passed by the user via the `hostURLs` config. These take the highest priority.
2. Default host URLs integrated into the SDK. If no URLs are specified via the config, the SDK falls back to these production URLs.

{% hint style="info" %}
* The exact default production URLs are not specified in the SDK documentation.
* The SDK does not include any predefined stage URLs - only production URLs. To use the SDK with a staging environment, you must specify the stage URLs via `ClientInfo` or `pango_default_urls.json`.
{% endhint %}

## Customizing Backend URLs

You can override the default production URLs by adding `hostURLs` in the Configuration.

```swift
let hydraConfiguration = HydraConfiguration(
    // ...
    hostUrls: ["https://url-1.net", "https://url-2.com", "https://url-3.com"]
    // ...
)
```

## When to Use Custom Backend URLs <a href="#when-to-use-custom-backend-urls" id="when-to-use-custom-backend-urls"></a>

Custom backend URLs are useful in a few scenarios:

* Pointing the SDK to stage/dev backend environments for testing
* Supporting backend URLs specific to your application or project
* Overriding the default production URLs with your own fallbacks
