> ## Documentation Index
> Fetch the complete documentation index at: https://coollabstechnologiesbt.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# DNS Configuration

> A guide on how to configure DNS for your domains with Coolify.

In general you need an `A` record for all the domains or subdomains you want to use, pointing to the IP address of your server where you would like to deploy your application.

Note that you can use the same IP address for multiple domains and subdomains.

**In the examples, `1.1.1.1` is your server's IP address.**

## Single Domain

Let's say you want deploy your resource to `example.com` with the IP address `1.1.1.1`.

* You need to set an `A` record for `example.com` pointing to `1.1.1.1`.

<Tip>
  You can also add `www.example.com` as an `A` record and redirect it inside
  Coolify with the chosen reverse proxy.
</Tip>

Then you can use `https://example.com` as a FQDN (Fully Qualified Domain Name) for any of your resources, even for your Coolify instance.

## Wildcard Domains

Let's say you want deploy your resource to `*.example.com` with the IP address `1.1.1.1`.

* You need to set an `A` record for `*.example.com` pointing to `1.1.1.1`.

This allows you to use any subdomain of `example.com` as a FQDN (Fully Qualified Domain Name) for any of your resources, even for your Coolify instance.

For example, you can use `https://app.example.com` or `https://api.example.com` as a FQDN.

## Autogenerated Domains

If you set a wildcard domain in your DNS settings, you can also use Coolify to autogenerate domains for your resources.
You just need to go to the `Server` settings and set the `Wildcard Domain` field to your domain, for example `https://example.com`.

Then if you create a new resource:

* You will get a random subdomain for your application, for example `https://random.example.com`.
* Also for your Preview Deployments, for example `https://<PRId>.random.example.com`.

<Tip>
  The Preview URL template could be modified in the application's page /
  `Preview Deployments` tab.
</Tip>

## Instance Domain

If you self-host Coolify, you can set your Coolify instance a custom domain in the `/settings` page.
