Your domain#
Rokh can show the customer steps on a hostname of your own domain, for example https://kyc.example.com. The address bar of the customer then shows your hostname, not rokh.id.
Rokh gets a certificate for your hostname from Let's Encrypt and renews it. You do not send a certificate to Rokh.
What changes#
- New customer links use your hostname, for example
https://kyc.example.com/r/…. You can stop this. Read Links. - Links that you made before stay valid on
https://rokh.id. - Your hostname shows only the customer steps of your account. A link of a different vendor does not open on your hostname.
- The vendor panel, the operations desk and the vendor API stay on
https://rokh.id. - The requests, the checks, the results and the webhooks do not change.
Each account can have one hostname.
Add your hostname#
- Sign in to the vendor panel.
- Open Developers.
- In Your own domain, type the hostname, for example
kyc.example.com. - Click Add the domain. The panel shows two DNS records.
- Add the two records to the DNS of your domain.
- Click Check.
Rules for the hostname:
- Use a hostname of a domain that you control. A subdomain such as
kyc.example.comis best. - Type only the hostname. Do not type
https://, a path or a port. - Rokh does not accept wildcards, IP addresses or hostnames of
rokh.id. - Rokh accepts a hostname in Persian script. It keeps the hostname in the ASCII form of DNS, for example
xn--…. - Each hostname can belong to one account only.
DNS records#
| Type | Name | Value |
|---|---|---|
CNAME |
Your hostname, for example kyc.example.com |
rokh.id |
TXT |
_rokh. and your hostname, for example _rokh.kyc.example.com |
rokh-verify= and your token. The panel shows the full value. |
The CNAME record sends the browsers of your customers to Rokh. The TXT record shows that the hostname is yours. Each account has a different token.
Rules for the records:
- If your DNS service cannot put a CNAME record on the hostname, use an
Arecord. Its value is the IPv4 address ofrokh.id. The panel anda_valuesshow this address. - Do not add other
AorAAAArecords to the hostname. Rokh refuses a hostname that also points to a different server. - Do not send the hostname through a proxy service or a CDN. The connections of your customers must go directly to Rokh.
- If your domain has a
CAArecord, it must allowletsencrypt.org. If not, Let's Encrypt does not give the certificate. - Keep the two records while you use the hostname. Let's Encrypt examines the hostname again before each renewal.
A change in DNS can take a few hours.
Status#
| Status | Meaning | What you do |
|---|---|---|
pending_dns |
Rokh waits for the two DNS records. | Add the records. Then click Check. |
issuing |
The records are correct. Rokh gets the certificate. This takes one or two minutes. | Wait. |
active |
Your hostname shows the customer steps. | Nothing. |
failed |
Rokh did not get a certificate. | Examine the records. Then click Check again. |
removing |
Rokh removes the hostname and its certificate. This takes about one minute. | Wait. |
Rokh also examines the DNS records automatically every 5 minutes during the first 14 days. After 14 days, click Check after you change a record.
Problems#
When a check finds a problem, the domain record shows it in problems. Each problem has a code and a text.
| Code | Meaning |
|---|---|
txt_record_missing |
Rokh does not find the TXT record. |
txt_record_wrong |
The TXT record has a different value. Copy the value again. |
hostname_does_not_resolve |
The hostname does not have an address. Add the CNAME record. |
hostname_points_elsewhere |
The hostname has an address of a different server. |
dns_tools_unavailable |
Rokh cannot read DNS records now. Try again later. |
activation_failed |
Rokh did not get a certificate. Examine the records and the CAA record. Then click Check again. |
Links#
use_for_links controls the address of new customer links.
true(default): when the hostname isactive, new links use your hostname.false: new links usehttps://rokh.id. Your hostname still opens the links of your account.
The customer_url of a request always shows the current setting. When you read a request again, customer_url can change. The token in the link does not change.
Use the API#
The domain endpoints accept your API key or the panel session.
Add the hostname:
PUT /api/vendor/panel/domain
Authorization: Bearer rk_live_…
Content-Type: application/json
{"hostname": "kyc.example.com", "use_for_links": true}
The response:
{
"domain": {
"hostname": "kyc.example.com",
"status": "pending_dns",
"use_for_links": true,
"url": "https://kyc.example.com",
"created_at": "2026-10-12T09:00:00+00:00",
"updated_at": "2026-10-12T09:00:00+00:00",
"last_check_at": null,
"active_since": null,
"cert_expires_at": null,
"problems": [],
"dns_records": [
{"type": "CNAME", "name": "kyc.example.com", "value": "rokh.id", "a_values": ["116.203.19.92"], "note": "Or an A record to 116.203.19.92"},
{"type": "TXT", "name": "_rokh.kyc.example.com", "value": "rokh-verify=3f0c…", "a_values": [], "note": ""}
]
},
"server_host": "rokh.id"
}
| Method | Endpoint | Effect |
|---|---|---|
GET |
/api/vendor/panel/domain |
Your hostname, its status and the DNS records. domain is null when you have no hostname. |
PUT |
/api/vendor/panel/domain |
Add the hostname, or change use_for_links. |
POST |
/api/vendor/panel/domain/check |
Examine the DNS records now. |
DELETE |
/api/vendor/panel/domain |
Remove the hostname. |
Rules:
- The body of
PUTcan have onlyhostnameanduse_for_links. - Another account has the hostname: the response is
409. - You can replace a hostname in
pending_dnswith a different hostname. In all other statuses, remove the hostname first. If not, the response is409. - Within 10 seconds of a check,
POST …/domain/checkgives the result of that check again. - You have no hostname:
POST …/domain/checkandDELETEgive404.
Your hostname and your own site#
You can also show the steps inside a page of your site. Read Your own site. Then load the SDK from your hostname:
<script src="https://kyc.example.com/static/sdk/rokh-kyc.js"></script>
The SDK accepts only customer links on the hostname that it comes from. If you use use_for_links: false, load the SDK from https://rokh.id.
Your allowed origins also apply on your hostname.
Remove your hostname#
- In Your own domain, click Remove.
- Click Remove again to confirm.
As an alternative, send DELETE /api/vendor/panel/domain.
- A hostname in
pending_dnsgoes at once. - In all other statuses, the status becomes
removing. Rokh then removes the site and the certificate.
After the removal, customer links on your hostname stop. The same link on https://rokh.id stays valid. The API then gives customer_url on https://rokh.id again. You can then remove the two DNS records.