Web Frameworks · Integration Playbook

Custom HTTPS Domain for FastAPI (Python)

Deploy FastAPI on Fly.io, Railway, or Render. Add agentdomains proxy so /docs and /openapi.json serve over HTTPS.

Best Mode Edge HTTPS Proxy
Setup 3 Commands
TLS Cert Automatic Edge
Trial Cost $0 / 30 days
ORIGIN HOST FastAPI (Python) fastapi-demo.fly.dev Your server or PaaS PROXY AGENTDOMAINS Edge HTTPS Reverse Proxy fastapi-demo.agentdomains.co Automatic Cloudflare Edge TLS TLS 1.3 AUTO HTTPS Users & Agents Port 443 · Valid Cert Zero bandwidth caps

Origin-to-edge flow for FastAPI (Python): connect fastapi-demo.fly.dev to fastapi-demo.agentdomains.co with automatic HTTPS.

1. Choose Mode: Edge Proxy vs DNS-01

A Record + ACME DNS-01

FOR BARE VPS
  • Point directly at your server IPv4 or IPv6 address.
  • Issue certs via Caddy or agentdomains txt DNS-01.
  • Works even when your firewall blocks port 80.
FastAPI (Python) — 3-command AgentDomains setup
agentdomains signup
agentdomains claim fastapi-demo --email you@example.com --domain agentdomains.co
agentdomains proxy fastapi-demo fastapi-demo.fly.dev --domain agentdomains.co

2. Interactive: Generate My CLI Command

Enter your subdomain label and origin below. Copy the generated commands or check live name availability.

Live CLI Generator & Availability Checker
Click "Check Availability Live" to query api.agentdomains.co/v1/available.
Generated shell commands for FastAPI (Python)

        

3. FastAPI (Python) Origin Configuration

Apply this config on FastAPI (Python) so headers, TLS, and routing match your new hostname.

FastAPI (Python) server / platform config
# Run Uvicorn trusting proxy headers so request.url reflects HTTPS
uvicorn main:app --host 0.0.0.0 --port 8000 --proxy-headers --forwarded-allow-ips="*"

Operational Checklist

Debug DNS & ACME Live → Connect via MCP Instead

Frequently asked questions

Should I use edge proxy or an A record for FastAPI (Python)?

Deploy FastAPI on Fly.io, Railway, or Render. Add agentdomains proxy so /docs and /openapi.json serve over HTTPS.

How do I check DNS propagation for FastAPI (Python)?

Open /tools/dns-ssl-checker or run dig @1.1.1.1 fastapi-demo.agentdomains.co. Confirm both Cloudflare and Google return your record.

Can an AI agent configure FastAPI (Python) routing via MCP?

Yes. Connect your client to https://mcp.agentdomains.co. Ask it to call claim_domain and set_proxy.

Related Host Playbooks

Web Frameworks

Next.js

Use agentdomains proxy for Next.js on Railway, Fly.io, or Render. On Vercel, add a custom domain CNAME because Vercel checks the Host header.

Web Frameworks

Express.js (Node)

Use agentdomains proxy for PaaS Express apps, or an A record on a VPS. Enable trust proxy so req.ip works right.

Web Frameworks

Go net/http

Point an A record at your Linux server. Serve HTTPS directly with Go autocert and skip external proxies.

Web Frameworks

Flask (Python)

Use agentdomains proxy in front of Render/Railway/Fly Gunicorn deployments and wrap Flask with Werkzeug’s ProxyFix middleware.

30 Days Free · No Card Required

Claim your agent domain now

Start with 10 free HTTPS domains under agentdomains.co or makes.fyi for 30 days. Upgrade to Pro for $10/year to keep up to 100 names with visitor stats.