Custom Domain
Serve your docs from your own domain instead of the default DocStar link. A custom domain gives readers a branded, trusted URL, keeps your docs consistent with your website, and is required for search engines to index your docs.
Choose a method
| You want | Example | Method |
|---|---|---|
| Docs on a subdomain | docs.yourdomain.com |
CNAME |
| Docs under a path on your main site | yourdomain.com/help |
Cloudflare Worker (your domain must use Cloudflare) |
Key rules
The Domain tab checks these rules when you click Save:
- Domain Name is only the domain, such as
docs.yourdomain.com. Don't include a path likeyourdomain.com/api. - Path starts with
/and is one segment, such as/help,/docsor/api. Don't write the full domain, and don't use nested paths like/api/help. - You can't set a path without a domain.
- You can't combine a subdomain with a path.
api.yourdomain.com+/docis not allowed. Use a subdomain alone, or your main domain with a path. - You can't use
docstar.ioor any of its subdomains.
Method 1: CNAME (subdomain)
Step 1: Add the domain in DocStar
- Open the collection and click Settings in the left sidebar.
- Open the Domain tab.
- In Domain Name, enter your full subdomain, for example
help.yourdomain.com. - Leave Path empty.
- Click Save.

Step 2: Add a CNAME record at your DNS provider
Create a new DNS record. In Cloudflare, go to DNS > Records > Add record.
| Type | Name | Target |
|---|---|---|
| CNAME | help (your subdomain) |
cname.docstar.io |

DNS changes can take a few minutes to a few hours to take effect. Then open https://help.yourdomain.com to check.
Method 2: Cloudflare Worker (path)
Step 1: Add the domain and path in DocStar
- Go to Settings > Domain.
- In Domain Name, enter your main domain, for example
yourdomain.com. - In Path, enter the path, for example
/help. - Click Save.
Step 2: Copy the Worker code
Once both fields are filled in, the tab shows "Click here to get the cloudflare Worker code". Click View Code, then copy the code from Code Preview. Your domain, path and collection ID are already filled in.

Step 3: Create the Worker in Cloudflare
- In Cloudflare, go to Workers & Pages > Create application and create a new Worker.
- Open the Worker and click Quick Edit (or Edit code).
- Replace the default code with the code you copied from DocStar.
- Click Deploy.

Step 4: Add a Worker route
- Go to Workers & Pages > Worker Routes for your domain and add a route.
- Enter your path pattern, for example
yourdomain.com/help*. - Select the Worker you created and save.

Open https://yourdomain.com/help to check.
After setup
- The live URL in Settings > Publish Collection switches to your domain.
- Your docs no longer show the default DocStar URL.
- Search engines can index your docs. On a CNAME subdomain,
sitemap.xml,robots.txtandllms.txtare served at the domain root. See SEO, Sitemap and llms.txt. - The collection must be published for the domain to show your docs. See Publish Pages.
To stop using the domain, clear Domain Name and Path and click Save, then remove the DNS record or Worker route.