> For the complete documentation index, see [llms.txt](https://docs.create-magento-app.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.create-magento-app.com/usage-guide/setup-custom-domain.md).

# Using custom domain

{% hint style="danger" %}

## For Multi-Store configuration use [the following guide](/usage-guide/configuring-multi-store.md)

{% endhint %}

{% hint style="warning" %}
This page is relevant for `magento-scripts` versions before 2.2.x.

Version 2.2.x is using Multi Store configuration.
{% endhint %}

## 1. Add domain to the /etc/hosts file

In order for this config to work you need to add your host domain to the `/etc/hosts` file, for example:

```bash
# /etc/hosts file
127.0.0.1 localhost
127.0.0.1 scandipwa.local # some other domain
```

## 2. Setup CMA

Add to your `cma.js` file field `host` with your domain:

```javascript
module.export = {
    magento: { ... },
    host: 'scandipwa.local'
}
```

That is it! Just now we have setup a domain in our application!\
Now to apply changes we need to run the [start](/getting-started/available-commands/start.md) command **without** [**-s option**](/getting-started/available-commands/start.md#s-skip-setup).
