> For the complete documentation index, see [llms.txt](https://docs.cloud.olakrutrim.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloud.olakrutrim.com/basics/core-infrastructure/networking/dns.md).

# DNS

Krutrim Cloud DNS is a fully managed, scalable, and high-performance Domain Name System (DNS) service. It enables you to create and manage **hosted zones**, configure DNS records, and route user requests to your applications and workloads running on Krutrim Cloud.

By integrating DNS management directly within the platform, you can connect your domains, APIs, and services to the internet or internal VPCs without relying on external DNS providers.

***

### Introduction

#### What is Krutrim Cloud DNS?

Krutrim Cloud DNS provides domain name resolution for your hosted workloads. It converts user-friendly domain names like `example.com` into IP addresses that computers use to communicate.

The service offers:

* **Managed Public and Private Hosted Zones**
* **Support for all standard DNS record types**
* **Advanced Routing Policies** (Simple, Weighted, GeoIP, Health Checks)

***

### Core Concepts

#### DNS and Hosted Zones

A **domain** (e.g., `example.com`) is a unique name on the internet.\
A **hosted zone** is a container for the DNS records associated with that domain.

Krutrim Cloud DNS supports:

* **Public Hosted Zones (coming soon)** – Resolve names over the internet.
* **Private Hosted Zones** – Resolve names only within your selected VPCs. You can attach multiple VPCs to a private hosted zone.

***

#### Supported DNS Record Types

| Record Type | Description                                        | Example                               |
| ----------- | -------------------------------------------------- | ------------------------------------- |
| **A**       | Maps a domain name to an IPv4 address              | `example.com → 192.0.2.1`             |
| **AAAA**    | Maps a domain name to an IPv6 address              | `example.com → 2001:db8::1`           |
| **CNAME**   | Creates an alias to another domain                 | `www.example.com → example.com`       |
| **MX**      | Routes email to mail servers                       | `example.com → mail.example.com`      |
| **TXT**     | Stores text data, e.g. verification or SPF records | `v=spf1 include:_spf.google.com ~all` |
| **NS**      | Defines the authoritative nameservers              | `ns1.krutrim.cloud.`                  |

***

#### Routing Protocols

| Protocol       | Description                                                                                                                                                                                                                                                                                        | When to Use                                                                                                                     |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Simple**     | Sends all traffic to a single IP address. This is the default and easiest routing option.                                                                                                                                                                                                          | Use when you have one server or endpoint handling all user requests.                                                            |
| **Weighted**   | Splits traffic between multiple IP addresses based on the weight you assign to each one. Higher weight means more traffic goes to that server.                                                                                                                                                     | Use when you want to distribute traffic unevenly between servers — for example, to send more users to a higher-capacity server. |
| **GeoIP**      | Routes users based on their location, such as country or region. Each location can be mapped to a specific server or IP.                                                                                                                                                                           | Use when you want users to connect to the nearest data center for better speed and performance.                                 |
| **HealthPort** | Routes traffic only to servers that are healthy and actively responding on a specific port. Supports both load balancing and failover by using **Primary** and **Secondary IP sets** — traffic goes to primary IPs under normal conditions and switches to secondary IPs if the primary ones fail. | Use when you need high availability and automatic failover between servers, such as for critical web or application services.   |
| **HealthURL**  | Checks the health of a server through an HTTP or HTTPS endpoint before routing traffic to it. If the endpoint is unavailable, traffic is redirected elsewhere.                                                                                                                                     | Use for web applications or APIs where you want routing decisions based on real-time application health.                        |

> Advanced routing applies to **A** and **AAAA** records only.

***

### Getting Started

#### Create a Hosted Zone

1. Go to **Networking → DNS** in the Krutrim Cloud Console.
2. Click **Create Hosted Zone**.
3. Enter your **Domain Name** (e.g., `example.com`).
4. Choose **Public** or **Private**:
   * **Public (coming soon)**: Accessible over the internet
   * **Private**: Accessible only within a selected VPC
5. (If Private) Select the VPC.
6. Click **Create**.

***

#### Add DNS Records

Once the hosted zone is created:

1. Open the hosted zone management page from the DNS dashboard.
2. Go to **Add Record**.
3. Select record type (A, CNAME, MX, TXT, etc.).
4. Fill in the fields:
   * **Record Name**
   * **Record Value(s)**
   * **TTL**
   * **Routing Protocol** (for A/AAAA)
5. Click **Save Record**.
6. You can edit records from their entries in the DNS records table.

### Managing Hosted Zones

#### View Hosted Zones

From the **Hosted Zones** landing page, you can:

* View all your zones with filters for Public/Private
* See record counts, type, and creation date
* Manage or delete zones

#### Associate multiple VPCs with Private Zone

1. Open a private hosted zone.
2. Click **Attach VPC**.
3. Select the desired VPC and save.

{% hint style="info" %}
Only resources inside associated VPCs can resolve records from a private zone.
{% endhint %}

***

### Best Practices

* **Use low TTLs (60–300s)** for frequently updated records.
* **Use Weighted routing** for smooth traffic distribution.
* **Avoid overlapping private zones** across VPCs.
* **Leverage HealthPort/HealthURL** for high availability.
* **Review records periodically** to remove unused entries.

***

### Billing

| Service                    | Flavor          | Unit                | Price / Hour | Price / Month |
| -------------------------- | --------------- | ------------------- | ------------ | ------------- |
| DNS Base Charge - Per zone | Upto 25         | Hour                | ₹0.031       | ₹22.04        |
| DNS Base Charge - Per zone | Above 25        | Hour                | ₹0.012       | ₹8.81         |
| DNS Zones - Query Charges  | Upto 1 Billion  | per million queries | --           | ₹35.26        |
| DNS Zones - Query Charges  | Above 1 Billion | per million queries | --           | ₹17.63        |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloud.olakrutrim.com/basics/core-infrastructure/networking/dns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
