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

# Domain Monitors

> Monitor domain registration expiration dates

Domain monitors track when your domain registrations expire, ensuring you never accidentally lose a critical domain.

## Why Monitor Domain Expiration?

* Expired domains can be registered by others
* Email and services stop working immediately
* Recovery can be expensive and time-consuming
* Registrar auto-renewal can fail

## Creating a Domain Monitor

<Tabs>
  <Tab title="Dashboard">
    1. Go to **Dashboard > Domains**
    2. Click **Add Domain**
    3. Enter the domain to monitor
    4. Set alert threshold
  </Tab>

  <Tab title="CLI">
    ```bash theme={null}
    kodo domains add example.com --warn 60 --critical 14

    # With service link
    kodo domains add example.com --service SERVICE_ID
    ```
  </Tab>

  <Tab title="API">
    ```bash theme={null}
    curl -X POST "https://kodostatus.com/api/v1/domain-monitors" \
      -H "X-API-Key: your_api_key" \
      -H "Content-Type: application/json" \
      -d '{
        "domain": "example.com",
        "alert_threshold_warning": 60,
        "alert_threshold_critical": 14
      }'
    ```
  </Tab>
</Tabs>

## What We Track

| Data            | Description                                  |
| --------------- | -------------------------------------------- |
| Expiration date | When the domain registration expires         |
| Registrar       | Domain registrar (GoDaddy, Cloudflare, etc.) |
| Nameservers     | Current DNS nameservers                      |
| WHOIS data      | Registration information                     |

## Alert Thresholds

Domain renewals often take longer to process than SSL certificates:

| Days Before Expiry | Recommended Action           |
| ------------------ | ---------------------------- |
| 60 days            | Start renewal process        |
| 30 days            | Urgent reminder              |
| 14 days            | Critical - renew immediately |

## Domain Information

```json theme={null}
{
  "domain": "example.com",
  "expires_at": "2025-01-15T00:00:00Z",
  "days_until_expiry": 365,
  "registrar": "Cloudflare",
  "nameservers": ["ns1.cloudflare.com", "ns2.cloudflare.com"]
}
```

## Best Practices

<AccordionGroup>
  <Accordion title="Enable registrar auto-renewal">
    Use domain monitoring as a backup, not a replacement for auto-renewal.
  </Accordion>

  <Accordion title="Monitor all critical domains">
    Include main domain, subdomains purchased separately, and acquired domains.
  </Accordion>

  <Accordion title="Alert early">
    60+ days gives time for payment issues, registrar problems, or transfer delays.
  </Accordion>

  <Accordion title="Keep payment methods current">
    Expired credit cards are the #1 cause of domain expiration.
  </Accordion>
</AccordionGroup>
