custom-domains
БесплатноБез исполняемых скриптовНе проверенRegister and manage custom domains for IC canisters via the HTTP gateway custom domain service. Covers DNS record configuration (CNAME, TXT, ACME challenge)…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Custom Domains
What This Is
By default, canisters are accessible at <canister-id>.icp.net. The custom domains service lets you serve any canister under your own domain (e.g., yourdomain.com). You configure DNS, deploy a domain ownership file to your canister, and register via a REST API. The HTTP gateways then handle TLS certificate provisioning, renewal, and routing automatically.
Custom domains work at the boundary node level — they map a domain to any canister ID via DNS. This works with any canister that can serve /.well-known/ic-domains over HTTP, not just asset canisters. That includes asset canisters, Juno satellites, and custom canisters implementing http_request.
Prerequisites
- A registered domain from any registrar (e.g., Namecheap, GoDaddy, Cloudflare)
- Access to edit DNS records for that domain
- A deployed canister that serves
/.well-known/ic-domainsover HTTP (asset canisters, Juno satellites, or any canister implementinghttp_request). On a cloud engine (OpenCloud) the engine adds the domain to that file, and the frontend canister must run certified-assets 0.4.3 or newer (@dfinity/[email protected]or later;v1.0.0is current): see pitfall 10 curlfor the registration API callsjq(optional, for formatting JSON responses)
Mistakes That Break Your Setup
Not disabling your DNS provider's SSL/TLS. Providers like Cloudflare enable Universal SSL by default. This interferes with the ACME challenge the IC uses to provision certificates and can prevent certificate renewal. Disable any certificate/SSL/TLS offering from your DNS provider before registering.
Setting a CNAME on the apex domain. Many DNS providers don't allow CNAME records on the apex (e.g.,
example.comwith no subdomain). Use ANAME or ALIAS record types (CNAME flattening) if your provider supports them. Otherwise, use a subdomain likewww.example.com.Missing the
_acme-challengeCNAME. Without_acme-challenge.CUSTOM_DOMAINpointing to_acme-challenge.CUSTOM_DOMAIN.icp2.io, the HTTP gateways cannot obtain a TLS certificate. Registration will fail.Multiple TXT records on
_canister-id. If more than one TXT record exists for_canister-id.CUSTOM_DOMAIN, registration fails. Keep exactly one containing your canister ID.Forgetting the
.well-known/ic-domainsfile. The canister must serve/.well-known/ic-domainslisting your custom domain. Without it, domain ownership verification fails during registration.Stale
_acme-challengeTXT records from your DNS provider. Previous ACME challenges by your provider may leave TXT records on_acme-challenge.CUSTOM_DOMAINthat don't appear in your dashboard. These conflict with the IC's ACME flow. Disable all TLS offerings from your provider to clear them. Verify withdig TXT _acme-challenge.CUSTOM_DOMAIN.Not explicitly registering the domain. DNS configuration alone is not enough. You must call
POST /custom-domains/v1/CUSTOM_DOMAINto start registration. It is not automatic.Setting
HttpAgent'shostto your custom domain.hostis the API endpoint canister calls go to, not the domain your frontend is served from. Your custom domain is the HTTP gateway — it does not serve/api/v2, so pointinghostat it (or atwindow.location.origin) makes calls fail. You do not need to sethost: a recent@icp-sdk/coreHttpAgentresolves an omittedhosttohttps://icp-api.io(the mainnet API boundary nodes) on a custom domain. Leave it unset, or set it explicitly tohttps://icp-api.io— never the gateway domain.Adding a custom domain to an app that already has users. II principals are per-origin, so the new domain hands every returning user a brand-new account. Pin a derivation origin — the canister address, which a custom domain can never displace — and list the domain in
.well-known/ii-alternative-originsbefore the domain goes live. A domain that has already collected sign-ins cannot be repointed without orphaning those accounts. See theuser-sign-inskill.Dropping a file the app ships on a cloud engine, or a frontend older than certified-assets 0.4.3 there. On a cloud engine (OpenCloud), the engine adds each domain the app holds to its frontend canister's
/.well-known/ic-domains(the HTTP gateway checks the domain against it) and/.well-known/ii-alternative-origins(Internet Identity reads it). It writes them with certified-assets'upload_asset, which arrived in 0.4.3. It keeps every entry the app ships in those files and removes only its own, so an app that ships them keeps shipping them. Above all, a canister other apps sign in through must keep shipping itsii-alternative-originswith each app's canister address: that entry is its consent, and the engine never writes it. Taking the file out of the build "so the engine owns it" breaks sign-in for every app that derives from it. Add domains through the engine (Step 2): a domai
Установить custom-domains в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл custom-domains?
Register and manage custom domains for IC canisters via the HTTP gateway custom domain service. Covers DNS record configuration (CNAME, TXT, ACME challenge), the .well-known/ic-domains file, domain registration/validation/update/deletion via the REST API, TLS certificate provisioning, and HttpAgent host configuration. Use when the user wants to serve a canister under a custom domain, configure DNS for IC, register a domain with boundary nodes, troubleshoot custom domain issues (including a cloud engine console warning that the engine can't write /.well-known/ic-domains), or update/remove a custom domain. Do NOT use for general frontend hosting or asset/static-site canister configuration without custom domains — use static-site instead.
Как установить скилл custom-domains?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл custom-domains запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic