| title | Custom Domains |
|---|---|
| description | Host your documentation on your own domain |
Connect your own domain to your DevDoc documentation. Each project gets one free custom domain.
Your documentation is always available at your-project.devdoc.sh. With a custom domain, you can also serve it from your own domain like docs.example.com.
| Feature | Details |
|---|---|
| Cost | Free |
| Limit | 1 custom domain per project |
| SSL | Automatic via Let's Encrypt |
| Propagation | DNS: 1-24 hours, SSL: 1-24 hours |
Run the domain add command with your desired domain:
devdoc domain add docs.example.comYou'll receive DNS records to configure:
✓ Domain docs.example.com added!
Next, add these DNS records to your domain provider:
1. CNAME Record:
Name: docs
Value: cname.devdoc-dns.com
2. TXT Record (for verification):
Name: _devdoc-verify.docs.example.com
Value: devdoc-verify=abc123xyz...
Add the DNS records to your domain provider. The exact steps vary by provider:
| Field | Value |
|---|---|
| Type | CNAME |
| Name | docs (or your subdomain) |
| Value | cname.devdoc-dns.com |
| TTL | 300 (or Auto) |
| Field | Value |
|---|---|
| Type | TXT |
| Name | _devdoc-verify.docs.example.com |
| Value | devdoc-verify=... (from CLI output) |
| TTL | 300 (or Auto) |
After adding DNS records, verify the configuration:
devdoc domain verifyIf successful:
DNS Verification Results
------------------------
Domain: docs.example.com
CNAME Record:
✓ Found: cname.devdoc-dns.com
TXT Verification Record:
✓ Verified
DNS verified!
SSL certificate will be provisioned automatically (1-24 hours).
View your domain's current status anytime:
devdoc domain status| Status | Description |
|---|---|
| Pending | Waiting for DNS configuration |
| DNS Verified | DNS configured, SSL provisioning |
| SSL Provisioning | Certificate being issued |
| Active | Domain is live and working |
| Error | Configuration issue (check DNS) |
To remove your custom domain:
devdoc domain removeOr specify the domain explicitly:
devdoc domain remove docs.example.comYour documentation remains accessible at the default *.devdoc.sh subdomain.
You can also configure your custom domain in a domain.json file:
{
"$schema": "https://devdoc.sh/schemas/domain.json",
"customDomain": "docs.example.com",
"seo": {
"canonical": "https://docs.example.com"
}
}The CLI will detect this file during deployment and show the domain status.
- Go to your domain's DNS settings
- Add CNAME record:
- Name:
docs - Target:
cname.devdoc-dns.com - Proxy status: DNS only (gray cloud)
- Name:
- Add TXT record with verification value
- Set SSL/TLS encryption mode to Full (strict)
- Go to DNS Management for your domain
- Add CNAME record:
- Name:
docs - Value:
cname.devdoc-dns.com
- Name:
- Add TXT record with verification value
- Go to Advanced DNS settings
- Add CNAME record:
- Host:
docs - Value:
cname.devdoc-dns.com
- Host:
- Add TXT record with verification value
- Go to Hosted Zones for your domain
- Create CNAME record set:
- Name:
docs.example.com - Value:
cname.devdoc-dns.com
- Name:
- Create TXT record set with verification value
SSL certificates are automatically provisioned via Let's Encrypt after DNS verification. The process typically takes:
- DNS Propagation: 1-24 hours (sometimes up to 48 hours)
- SSL Provisioning: A few minutes to 24 hours
If your domain uses CAA (Certificate Authority Authorization) records, add:
0 issue "letsencrypt.org"
This authorizes Let's Encrypt to issue certificates for your domain.
The path /.well-known/acme-challenge is reserved for SSL certificate validation. Don't configure redirects or rewrites for this path.
After setting up your custom domain, update your canonical URL for better SEO:
// In docs.json
{
"seo": {
"metatags": {
"canonical": "https://docs.example.com"
}
}
}Or in domain.json:
{
"customDomain": "docs.example.com",
"seo": {
"canonical": "https://docs.example.com"
}
}- DNS changes can take 1-24 hours to propagate globally
- Use DNSChecker.org to verify propagation
- Ensure there are no typos in the record values
- Verify DNS is fully propagated
- Check CAA records if configured
- Ensure
/.well-known/acme-challengepath is not blocked - For Cloudflare: Ensure proxy is disabled (gray cloud)
- Clear browser cache or use incognito mode
- Verify the domain points to the correct project
- Check
devdoc domain statusfor the domain status
To change your custom domain:
# Remove existing domain
devdoc domain remove
# Add new domain
devdoc domain add new-docs.example.com| Command | Description |
|---|---|
devdoc domain add <domain> |
Add a custom domain |
devdoc domain status |
Check domain status |
devdoc domain verify |
Verify DNS configuration |
devdoc domain remove [domain] |
Remove custom domain |
All commands support these options:
| Option | Description |
|---|---|
-u, --url <url> |
API URL (default: https://devdoc.sh) |
-k, --api-key <key> |
API key for authentication |