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

# Adding DNS Servers

> How to add new DNS servers to DNS-MNS

# Adding DNS Servers

One of the most valuable contributions is adding new DNS servers, especially ones that work well in Iran.

## DNS List Format

DNS servers are stored in `internal/dnslist/dns-list.conf` (embedded in the Go binary):

```
NAME|PRIMARY_IP|SECONDARY_IP|LOCATION|DOH_URL|DOT_HOST
```

| Field         | Description                               | Example                                |
| ------------- | ----------------------------------------- | -------------------------------------- |
| NAME          | Display name for the DNS                  | `Cloudflare`                           |
| PRIMARY\_IP   | Primary DNS server IP                     | `1.1.1.1`                              |
| SECONDARY\_IP | Secondary/fallback IP                     | `1.0.0.1`                              |
| LOCATION      | Geographic location or category           | `Global`                               |
| DOH\_URL      | DNS-over-HTTPS endpoint (use `-` if none) | `https://cloudflare-dns.com/dns-query` |
| DOT\_HOST     | DNS-over-TLS hostname (use `-` if none)   | `one.one.one.one`                      |

<Note>
  The `internal/dnslist/dns-list.conf` file is what the binary embeds. This is the only file you need to update.
</Note>

## Example Entries

```bash theme={null}
# International DNS
Cloudflare|1.1.1.1|1.0.0.1|Global
Google|8.8.8.8|8.8.4.4|Global

# Iranian DNS
Shecan|178.22.122.100|185.51.200.2|Iran
Electro|37.152.182.112|37.152.182.113|Iran

# Gaming DNS
RadarGame|10.202.10.10|10.202.10.11|Iran
```

## Adding a New DNS Server

### Step 1: Verify the DNS Works

Before adding, verify the DNS server is working:

```bash theme={null}
# Test ping
ping -c 3 NEW_DNS_IP

# Test DNS resolution
dig @NEW_DNS_IP google.com

# Or with nslookup
nslookup google.com NEW_DNS_IP
```

### Step 2: Edit dns-list.conf

Open the configuration file:

```bash theme={null}
# If installed
nano ~/.dns-mns/dns-list.conf

# If working with repo
nano dns-list.conf
```

### Step 3: Add Your Entry

Add your DNS server in the appropriate section:

```bash theme={null}
# Added YYYY-MM-DD - Brief description
# Source: URL or how you found this DNS
MyNewDNS|1.2.3.4|5.6.7.8|Location
```

### Step 4: Test with DNS-MNS

Build and run the tool to verify your DNS appears:

```bash theme={null}
go build -o dns-mns ./cmd/dns-mns/ && ./dns-mns
# Select "Test Gaming DNS"
# Look for your DNS in the list
```

## Categories

Add your DNS to the appropriate category in the file:

| Category      | Section Header               | Description                              |
| ------------- | ---------------------------- | ---------------------------------------- |
| International | `# International Gaming DNS` | Global providers like Cloudflare, Google |
| Regional      | `# Regional/Middle East DNS` | Iran-specific DNS servers                |
| Gaming        | `# Gaming Optimized DNS`     | Low-latency gaming DNS                   |
| Privacy       | `# VPN/Privacy DNS`          | Privacy-focused providers                |
| Additional    | `# Additional Iranian DNS`   | Extra Iranian DNS options                |

## Guidelines for Adding DNS

<Checklist>
  * DNS server is publicly accessible
  * DNS server is reliable (not frequently down)
  * DNS server resolves major domains correctly
  * For Iranian DNS: works within Iran
  * You have permission to share (for private DNS)
  * Entry follows the correct format
  * Added to appropriate category
</Checklist>

## Submitting Your Addition

### Via Pull Request (Preferred)

1. Fork the repository
2. Edit `dns-list.conf`
3. Commit with message: `feat: add [DNS Name] to dns list`
4. Open a pull request

**PR Description Template:**

```markdown theme={null}
## New DNS Server

**Name:** MyNewDNS
**Primary IP:** 1.2.3.4
**Secondary IP:** 5.6.7.8
**Location:** Iran

## Verification

- [x] Ping test successful
- [x] DNS resolution works
- [x] Tested from Iran (if applicable)

## Source

Found on [website/forum/etc.]
```

### Via Issue

If you're not comfortable with pull requests:

1. Open a new issue
2. Title: "Add DNS: \[DNS Name]"
3. Include:
   * DNS name
   * Primary and secondary IPs
   * Location
   * How you verified it works
   * Where you found it

## Bulk DNS Additions

If you have multiple DNS servers to add:

1. Create a text file with all entries
2. Open a pull request or issue
3. We'll review and merge valid entries

## Removing Outdated DNS

If you find a DNS server that no longer works:

1. Open an issue titled "DNS not working: \[DNS Name]"
2. Include:
   * Which DNS is not working
   * Error you're seeing
   * When you tested it

Or submit a PR removing the entry with verification.

## Privacy Considerations

When adding DNS servers:

* Don't add private/internal DNS without permission
* Verify the DNS provider is legitimate
* Note if the DNS has any content filtering

Thank you for helping expand the DNS-MNS database!
