Home/Recipes/Automated DNS Updates via Namecheap

Automated DNS Updates via Namecheap

Developer ToolsIntermediate10 minutes setup

Automated DNS Management with Namecheap

Update DNS records from Telegram, track propagation, and never touch cPanel again.

What You'll Build

A DNS management bot that:

  • Updates A, CNAME, TXT records via chat commands
  • Tracks DNS propagation globally
  • Auto-renews SSL certificates when DNS changes
  • Logs all DNS modifications with rollback capability

Requirements

  • Plugins: Namecheap (from Lobstash.ai)
  • Time: 10 minutes
  • Namecheap API: Enable in dashboard

Setup

1. Install Namecheap Plugin

Connect Namecheap account
API key: [from namecheap.com/profile/tools/apiaccess]
Import all domains

2. Define DNS Commands

Command format:

"dns update example.com A @ 192.0.2.1"
"dns update example.com CNAME www example.com"
"dns update example.com TXT @ v=spf1 include:..."
"dns list example.com"
"dns check propagation example.com"

3. Add Safety Rules

Before any DNS change:
- Show current record
- Show proposed change
- Ask for confirmation
- Log change with timestamp

Never auto-delete records without confirmation.

4. Set Up Propagation Tracking

After DNS update:
- Check propagation across 8 global DNS servers
- Report when 100% propagated (usually 5-30 minutes)
- Alert if propagation takes >1 hour

Sample Workflow

You: "dns update myapp.com A @ 192.0.2.50"

Agent:

๐Ÿ” Current Record
Domain: myapp.com
Type: A
Host: @
Value: 192.0.2.1
TTL: 3600

๐Ÿ“ Proposed Change
Value: 192.0.2.1 โ†’ 192.0.2.50

Confirm? Reply YES to update.

You: "YES"

Agent:

โœ… DNS Updated
Domain: myapp.com
Type: A
Host: @
New Value: 192.0.2.50

โณ Checking propagation...

Status:
๐ŸŸข Cloudflare: propagated
๐ŸŸข Google: propagated
๐ŸŸก OpenDNS: pending
๐Ÿ”ด Comcast: old value

Estimated full propagation: 15-20 minutes

I'll notify you when 100% complete.

15 minutes later:

๐ŸŽ‰ DNS Fully Propagated
Domain: myapp.com
All global DNS servers now serving: 192.0.2.50

Total propagation time: 18 minutes

Pro Tips

  1. Batch Updates: Send multiple updates in one message
  2. Subdomain Wildcard: Set up *.example.com catch-all records
  3. CDN Integration: Auto-update Cloudflare when you change Namecheap DNS
  4. Monitoring: Alert if DNS records change without your command (security)

Manage DNS like a pro โ†’ Launch Claws