---
name: dns-svcs-cr-add
title: Configuring a custom resolver
description: You can add a custom resolver in IBM Cloud&reg; DNS Services by using the UI, CLI, or API.
last-updated: 2025-06-03
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/dns-svcs?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Configuring a custom resolver
{: #ui-create-cr}

You can add a custom resolver in IBM Cloud&reg; DNS Services by using the UI, CLI, or API.
{: shortdesc}

## Creating a custom resolver in the console

{: #create-cr-ui}
{: ui}

To add a custom resolver in the console, follow these steps:

   You must create a DNS service before you create a custom resolver. Each VPC can only have one custom resolver.
   {: important}
   
1. If you haven't already, [create a DNS service](https://cloud.ibm.com/docs/dns-svcs?topic=dns-svcs-getting-started&interface=ui&format=markdown).
1. From your browser, open the [IBM Cloud console](https://cloud.ibm.com/login) and log in to your account.
1. Select the **Navigation Menu** ![Menu icon](../icons/icon_hamburger.svg), then click **Resource list > Networking > dns-cr-instance**.
1. Navigate to the **Custom resolver** tab, then click **Create custom resolver**. 
1. Enter a name and description for your custom resolver.
1. Select a profile, region, VPC, and subnet from the list menu.

   To achieve high availability, you must provide a minimum of two subnets. You can configure a maximum of three locations within the same subnet, or in different subnets.
   {: note}

1. Click **Add+** if you want to add another subnet.
1. Click **Create**.

   The custom resolver details view appears, where you can manage custom resolver settings.

### Creating a custom resolver without high availability
{: #cr-add-no-ha}

If you want to create a custom resolver without high availability, you must manually delete the second subnet field by clicking the **Delete** icon next to the second subnet.

![Delete second subnet](images/cr-no-ha.png "Delete the second subnet by clicking trashcan icon"){: caption="Delete the second subnet to remove high availability function" caption-side="bottom"}

## Creating a custom resolver from the CLI
{: #cli-create-cr}
{: cli}

To create a custom resolver using the CLI, run the following command:

`ibmcloud dns custom-resolver-create --name NAME --location LOCATION1 --location LOCATION2 [-d, --description DESCRIPTION] [--profile Profile] [-i, --instance INSTANCE] [--output FORMAT]`

Where:

- **-n, --name** is the name of the custom resolver.
- **-d, --description** is the descriptive text of the custom resolver.
- **--location** is the location where the custom resolver is running. The location subnet CRN is required. For example: `--location subnet1,enable  --location subnet2,disable`
- **--profile** is the profile name of custom resolver. Valid values: `essential`, `advanced`, `premier`.
- **-i, --instance** is the instance name or ID. If this is not set, the context instance specified by `dns instance-target INSTANCE` is used instead.
- **--output** specifies output format. Currently, `json` is the only supported format.

To create a custom resolver without high availability, run the command with `[-f, --force]`:

`ibmcloud dns custom-resolver-create --name NAME [--location LOCATION1] [--location LOCATION2] [-description DESCRIPTION] [--profile Profile] [-f, --force] [-i, --instance INSTANCE] [--output FORMAT]`

Where:

- **-f, --force** allows for creating custom resolver with fewer than 2 locations.


## Create a custom resolver with the API
{: #api-create-cr}
{: api}

To add a custom resolver using the API, follow these steps:

1. Set up your API environment with the correct variables.
1. Store the following values in variables to be used in the API command:
    * `instance_id`, which is the unique identifier of a service instance.
    * `X-Correlation-ID`, which is a string that uniquely identifies a request.
1. When all variables are initiated, add your custom resolver:

```sh
{
  "name": "my-resolver",
  "description": "custom resolver",
  "locations": [
    {
      "subnet_crn": "crn:v1:bluemix:public:is:us-south-1:a/01652b251c3ae2787110a995d8db0135::subnet:0716-b49ef064-0f89-4fb1-8212-135b12568f04",
      "enabled": false
    }
  ],
  "profile": "essential"
}
```
{: codeblock}


## Next steps
{: #next-steps-create-cr}

* [Adding custom resolver locations](https://cloud.ibm.com/docs/dns-svcs?topic=dns-svcs-cr-res-loc-add&format=markdown)
* [Custom resolver profiles](https://cloud.ibm.com/docs/dns-svcs?topic=dns-svcs-custom-resolver&format=markdown#cr-profiles)
* [Setting up custom resolver forwarding rules](https://cloud.ibm.com/docs/dns-svcs?topic=dns-svcs-cr-fwd-rules-add&format=markdown)
* [Deleting a custom resolver](https://cloud.ibm.com/docs/dns-svcs?topic=dns-svcs-cr-delete&format=markdown)