How to white label your Techdoc Documentation for branding?
White labelling allows you the flexibility to use various web addresses for your Techdoc.
For example: Your DocStar documentation will be available on https://docstar.io/{{folder_slug}}/{{article_slug}}
But if you want it to be present on your own domain like thingsofbrand.com, follow the steps below.
For Cloudflare:
Select the domain you want to use for Techdoc.

Option AConfigure using subdomain
A subdomain is like a separate neighborhood on the internet. Example: help.thingsofbrand.com — here, help is the subdomain.
Step 1Add domain in Techdoc settings
Add your full custom domain (including subdomain or endpoint).

Settings Configuration

Domain Setup
Step 2Create a CNAME record
In Cloudflare: DNS → Records → Add record

Step 3Fill details
- Type:CNAME
- Name:your subdomain (e.g.,
help) - Target:Techdoc or your custom domain endpoint

Option BConfigure using endpoint
Example: thingsofbrand.com/help
Step 1Add domain in Techdoc Configuration
Go to Configurations → Domain tab and fill in your details.
Step 2Open Worker Routes

Step 3Manage Workers
Use Cloudflare Workers to apply custom logic at the DNS level.

Step 4Create Application

Step 5Quick Edit your Worker

Quick Edit Interface

Worker File Structure
Step 6Paste this code
addEventListener('fetch', event => {
const url = new URL(event.request.url);
const pathName = '{{your_endpoint}}';
const collectionId = '{{your_collection_id}}';
const Domain = 'https://{{your_custom_domain}}/{{your_endpoint}}';
if (url.pathname === `/${your_endpoint}/` || url.pathname === `/${your_endpoint}`) {
event.respondWith(handleRootFaq(event));
} else if (url.pathname.startsWith(`/${your_endpoint}/`)) {
event.respondWith(handleFaqPath(event, url));
} else {
event.respondWith(fetch(event.request));
}
});
async function handleRootFaq(event) {
const originUrl = new URL('https://techdoc.walkover.in/p');
originUrl.searchParams.set('collectionId', collectionId);
const response = await fetch(originUrl.toString(), {
method: event.request.method,
headers: new Headers(event.request.headers)
});
return new Response(response.body, {
status: response.status,
statusText: response.statusText,
headers: response.headers
});
}
async function handleFaqPath(event, url) {
const originUrl = new URL(url.toString().replace(
Domain,
'https://techdoc.walkover.in/p'
));
originUrl.searchParams.set('collectionId', collectionId);
const response = await fetch(originUrl.toString(), {
method: event.request.method,
headers: new Headers(event.request.headers)
});
return new Response(response.body, {
status: response.status,
statusText: response.statusText,
headers: response.headers
});
}⚙️Variable Reference
- your_endpoint → your endpoint path
- collection_id → your Techdoc collection ID
- your_custom_domain → your domain name