Skip to content

Feature Request: Add custom domain management to wrangler CLI #11772

@hemanth

Description

@hemanth

Problem

Currently, there's no way to add custom domains to Cloudflare Pages or Workers projects via the wrangler CLI. Users must go through the web dashboard to configure custom domains.

Proposed Solution

Add domain management commands to wrangler:

# For Pages
wrangler pages domain add <domain> --project-name=<project>
wrangler pages domain list --project-name=<project>
wrangler pages domain remove <domain> --project-name=<project>

# For Workers
wrangler domain add <domain>
wrangler domain list
wrangler domain remove <domain>

Use Case

This would enable full CI/CD automation without requiring manual dashboard configuration. Developers could manage everything from their deployment scripts.

Example Workflow

# Build and deploy
npm run build
wrangler pages deploy dist --project-name=myapp

# Add custom domain programmatically
wrangler pages domain add myapp.com --project-name=myapp
wrangler pages domain add www.myapp.com --project-name=myapp

Benefits

  • Complete infrastructure-as-code capability
  • Faster deployment workflows
  • Better CI/CD integration
  • Parity with other cloud providers (Vercel, Netlify, etc.)

This feature would significantly improve the developer experience for teams using wrangler in automated pipelines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions