# Domain Registration Skill

Register domains via Google Cloud Domains API with immediate Cloudflare nameserver configuration.

## Quick Start

### 1. Prerequisites
```bash
# Install tools
brew install gcloud jq

# Authenticate Google Cloud
gcloud auth login
gcloud config set project YOUR_PROJECT_ID
gcloud services enable domains.googleapis.com

# Set Cloudflare credentials
export CLOUDFLARE_API_TOKEN="your_token_here"
export CLOUDFLARE_ACCOUNT_ID="your_account_id"
```

### 2. Create Contact File
```bash
cp templates/contact.yaml contact.yaml
# Edit contact.yaml with your info
```

### 3. Register Single Domain
```bash
# Check availability
gcloud domains registrations search-domains example.com

# Get Cloudflare nameservers
./scripts/get-cloudflare-ns.sh example.com

# Register with Cloudflare NS
gcloud domains registrations register example.com \
  --contact-data-from-file=contact.yaml \
  --contact-privacy=private-contact-data \
  --yearly-price="12.00 USD" \
  --name-servers="ns1.cloudflare.com,ns2.cloudflare.com"
```

### 4. Bulk Registration
```bash
# Create domains list
cp templates/domains.txt my-domains.txt
# Edit my-domains.txt with your domains

# Run bulk registration
./scripts/bulk-register.sh my-domains.txt
```

## What This Does

1. ✅ Registers domain via Google Cloud Domains
2. ✅ Immediately configures Cloudflare nameservers
3. ✅ Creates Cloudflare zone automatically
4. ✅ Private WHOIS by default
5. ✅ Auto-renewal enabled
6. ⏳ Transfer to Cloudflare Registrar available after 60 days

## Files

- `SKILL.md` — Complete documentation
- `scripts/bulk-register.sh` — Bulk registration script
- `templates/contact.yaml` — Contact data template
- `templates/domains.txt` — Domain list example

## Key Benefits

- **Programmatic:** Full API access, scriptable
- **Immediate Cloudflare:** DNS/CDN/Workers day 1
- **Cost-effective:** At-cost pricing, no markup
- **Secure:** Private WHOIS, DNSSEC support
- **Scalable:** Bulk registration support

## Cost Breakdown

**Google Cloud Domains (Registration):**
- .com: ~$12/year
- .net: ~$12/year
- .org: ~$12/year
- Pricing varies by TLD

**Cloudflare (Free):**
- DNS hosting: Unlimited queries
- CDN: 100GB/month free tier
- DDoS protection: Included

**Cloudflare Registrar (After 60-day transfer):**
- .com: ~$9.77/year (at-cost)
- No markup, WHOIS privacy included

## Important Notes

⚠️ **ICANN 60-Day Lock:** Cannot transfer registrar for 60 days after registration
✅ **Nameserver Change:** Can change nameservers immediately
📧 **Email Verification:** Required within 15 days (check spam)
🔄 **Auto-Renewal:** Enabled by default

## Support

- Google Cloud Domains: https://cloud.google.com/domains/docs
- Cloudflare API: https://developers.cloudflare.com/api
- Skill docs: See SKILL.md
