# `additional_hosts`


An additional hosts dictionary that maps hostnames to IP addresses.

Optional in [single-runtime](https://fixed.docs.upsun.com/create-apps/app-reference/single-runtime-image.md#top-level-properties) and [composable](https://fixed.docs.upsun.com/create-apps/app-reference/composable-image.md#top-level-properties) images.

If you use a private network and have specific IP addresses to connect to,
consider mapping those addresses to hostnames to better remember and organize them.
In such cases, you can add a map of those IP addresses to hostnames of your choice.
Then, when your app tries to access the hostname, the app is directed to the proper IP address.

For example, if your app attempts to access `api.example.com`, it is directed to `192.0.2.23`.

```yaml {}
applications:
  <APP_NAME>:
    type: 'nodejs:24'
    source:
      root: "/"
    additional_hosts:
      api.example.com: "192.0.2.23"
      web.example.com: "203.0.113.42"
```

    .platform.app.yaml

```yaml {}
applications:
  <APP_NAME>:
    type: "composable:25.05"
    source:
      root: "/"
    stack: 
      runtimes: [ "nodejs@24" ]
    additional_hosts:
      api.example.com: "192.0.2.23"
      web.example.com: "203.0.113.42"
```

This is equivalent to adding the mapping to the `/etc/hosts` file for the container.


