zeabur-domain-url
Original:🇺🇸 English
Not Translated
Use when services need public URL for redirects or CORS. Use when WEB_URL or similar has trailing slash issues. Use when user reports "redirect goes to wrong URL", "CORS error", or "trailing slash problem". Also use when user says "add domain", "set up domain", "bind domain", "create domain", or "manage domains" for a Zeabur service.
2installs
Sourcezeabur/agent-skills
Added on
NPX Install
npx skill4agent add zeabur/agent-skills zeabur-domain-urlSKILL.md Content
Zeabur Domain URL Configuration
Always useto invoke Zeabur CLI. Never usenpx zeabur@latestdirectly or any other installation method. Ifzeaburis not available, install Node.js first.npx
Symptom
- Redirects go to wrong URL (missing domain suffix, or has trailing slash)
- CORS errors due to URL mismatch
- has trailing slash causing path issues
${ZEABUR_WEB_URL}
System Variables
| Variable | Example | Note |
|---|---|---|
| | Has trailing slash |
| | Domain only, no protocol |
Solution
Expose URL from entry service to others:
yaml
- name: entry-service
domainKey: PUBLIC_DOMAIN
spec:
env:
APP_URL:
default: https://${ZEABUR_WEB_DOMAIN}
expose: true
- name: backend
spec:
env:
WEB_URL:
default: ${APP_URL}Use not to avoid trailing slash.
https://${ZEABUR_WEB_DOMAIN}${ZEABUR_WEB_URL}CLI Domain Management
List domains
bash
npx zeabur@latest domain list --id <service-id> -i=falseCreate a generated domain (*.zeabur.app)
Use to create a Zeabur-managed subdomain. With , takes only the prefix (not the full domain):
-g-g--domainbash
npx zeabur@latest domain create --id <service-id> -g --domain myapp -y -i=false
# Suffix is auto-appended by backend based on region:
# Default: myapp.zeabur.app
# Aliyun (China): myapp.preview.aliyun-zeabur.cn
# Tencent (China): myapp.preview.tencent-zeabur.cn
# Huawei (China): myapp.preview.huawei-zeabur.cn
# China suffixes require completed identity verification on Zeabur.Validation rules for generated domain prefix:
- At least 3 characters
- No dots allowed — only alphanumeric and hyphens
- Error if less than 3 chars
DOMAIN_NAME_TOO_SHORT - Error if prefix contains dots
UNSUPPORTED_DOMAIN_NAME
Create a custom domain
Without , takes a full domain name:
-g--domainbash
npx zeabur@latest domain create --id <service-id> --domain example.com -y -i=falseAfter creating a custom domain, use the skill to configure the required DNS records. For dedicated servers, find the IP with:
zeabur-domain-dnsbash
npx zeabur@latest server list -i=false
# Note the IP address of the server running your serviceThen at your DNS provider:
Type: A
Name: <your subdomain or @>
Value: <server IP from above>Do not guess DNS values. Always retrieve the actual server IP fromoutput before configuring DNS.server list
Delete domain
bash
npx zeabur@latest domain delete --id <service-id> --domain <domain> -y -i=falseCaution
- is always required in non-interactive mode. Without it the CLI returns
--domain.INVALID_DOMAIN_NAME - With , provide only the prefix (e.g.,
-g), not the fullmyapp.myapp.zeabur.app - Without , provide the complete domain (e.g.,
-g).example.com