your-org.whatdoc.xyz) or bring your own custom domain (e.g., docs.your-startup.com).
Subdomain Hosting
Every project gets a unique, SEO-friendly subdomain onwhatdoc.xyz.
Setting Up a Subdomain
- Navigate to your project’s Settings page
- Go to the Domains tab
- Enter your desired subdomain (e.g.,
my-api) - Click Save Subdomain
Subdomains must be unique across all WhatDoc projects. Only lowercase letters, numbers, and hyphens are allowed.
Subdomain Rules
The frontend automatically sanitizes your input:my-api→my-api.whatdoc.xyzacme-docs→acme-docs.whatdoc.xyzv2→v2.whatdoc.xyz
My_API(uppercase, underscore) → Converted tomyapihello--world(double hyphen) → Converted tohello-world
Subdomain Database Schema
Subdomains are stored in the Project model:Custom Domain Hosting
Pro users can connect their own custom domain (e.g.,docs.example.com) with automatic SSL provisioning via Cloudflare.
Custom domains are currently in beta testing mode. SSL provisioning can occasionally take up to 24 hours due to DNS propagation.
Setting Up a Custom Domain
- Navigate to your project’s Settings → Domains tab
- Scroll to the Custom Domain section
- Enter your domain (e.g.,
docs.example.com) - Click Connect
- Update your DNS records (instructions below)
DNS Configuration
After connecting your domain, WhatDoc displays the required DNS records:Step-by-Step DNS Setup
Create a CNAME record
Add a new CNAME record with the following values:
- Type:
CNAME - Name:
docs(or your subdomain) - Target:
cname.whatdoc.xyz - TTL:
Autoor3600
Save and wait for propagation
DNS changes can take 5 minutes to 48 hours to propagate globally. Use DNS Checker to monitor progress.
Custom Domain Code Implementation
The custom domain update handler inProjectSettings.jsx:
Custom Domain Database Schema
Domain Resolution Priority
WhatDoc resolves documentation URLs in the following order:- Custom Domain (if configured):
https://docs.example.com - Subdomain (if configured):
https://my-org.whatdoc.xyz - Fallback Path:
https://whatdoc.xyz/p/{project-slug}
URL Generation Logic
SSL & Security
All documentation sites (subdomains and custom domains) are served over HTTPS:- Subdomain SSL: Automatically provisioned via Cloudflare Universal SSL
- Custom Domain SSL: Automatically provisioned after DNS verification (up to 24 hours)
- TLS Version: 1.2+
- HSTS: Enabled (max-age=31536000)
Troubleshooting
Subdomain Issues
Error: Subdomain is taken
Error: Subdomain is taken
The subdomain you’re trying to claim is already in use. Try a different name or add a prefix/suffix (e.g.,
my-api-docs instead of api).Subdomain not resolving
Subdomain not resolving
Subdomain changes are instant. If you can’t access your subdomain:
- Clear your browser cache
- Try incognito mode
- Check that you saved the subdomain (look for the success toast)
Custom Domain Issues
DNS not propagating
DNS not propagating
DNS propagation can take up to 48 hours. Check your DNS records using:You should see a CNAME record pointing to
cname.whatdoc.xyz.SSL certificate not provisioning
SSL certificate not provisioning
SSL certificates are automatically issued after DNS verification. If it’s been more than 24 hours:
- Verify your CNAME record is correct
- Ensure your domain is not proxied through multiple CDNs
- Contact support at hello@whatdoc.xyz
ERR_TOO_MANY_REDIRECTS
ERR_TOO_MANY_REDIRECTS
This usually happens when Cloudflare SSL mode is set to Flexible. Change it to Full (strict) in your Cloudflare dashboard.
Domain Management UI
The domains tab in Project Settings provides:- Real-time validation of subdomain availability
- Visual DNS instructions with copy-paste CNAME values
- Current domain status with live URL preview
- One-click copy for sharing your docs URL
API Endpoints
Update Subdomain
Update Custom Domain
Remove Custom Domain
Pricing
| Feature | Free Tier | Pro Tier |
|---|---|---|
| Subdomain Hosting | ✅ Unlimited | ✅ Unlimited |
| Custom Domains | ❌ Not available | ✅ Up to 5 per account |
| SSL Certificates | ✅ Automatic | ✅ Automatic |
| DNS Management | N/A | ✅ Priority support |
Next Steps
Project Settings
Configure your project’s subdomain and custom domain
Live Editor
Edit and preview your documentation in real-time
