[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GPSR5SGXTNGKZXR02G78ZW":3,"skill-same:01M6GPSR5SGXTNGKZXR02G78ZW":89},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":43,"linkOnly":44,"markdownContent":45,"markdownBody":46,"frontMatter":47,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":55,"repositoryHtmlUrl":56,"repositoryHomepageUrl":6,"ownerHtmlUrl":57,"ownerBlogUrl":58,"ownerDescription":59,"updatedAt":60,"install":61,"resources":74},"01M6GPSR5SGXTNGKZXR02G78ZW","custom-domains",null,"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\u002Fic-domains file, domain registration\u002Fvalidation\u002Fupdate\u002Fdeletion 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, or update\u002Fremove a custom domain. Do NOT use for general frontend hosting or asset\u002Fstatic-site canister configuration without custom domains — use static-site instead.","jiayaoqijia\u002Fcryptoskill","jiayaoqijia","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1453879?v=4","01M6GMYTX7Q7S504VC6E756ENR","YQ","01M6GMYV1QKJ1CC75MTTGT9PR0",81,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-custom-domains\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-custom-domains\u002FSKILL.md",[],[20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"custom","custom domains","domains","remove","when","static","registrar","Custom Domain","asset","host","acme","static-site","frontend","challenge","configure","access","certificate","api","tls","dns","issues","update","troubleshoot","2026-11-10 10:12:30",false,"---\nname: custom-domains\ndescription: \"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\u002Fic-domains file, domain registration\u002Fvalidation\u002Fupdate\u002Fdeletion 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, or update\u002Fremove a custom domain. Do NOT use for general frontend hosting or asset\u002Fstatic-site canister configuration without custom domains — use static-site instead.\"\nlicense: Apache-2.0\ncompatibility: \"curl, DNS registrar access, deployed canister\"\nmetadata:\n  title: \"Custom Domains\"\n  category: Frontend\n---\n\n# Custom Domains\n\n## What This Is\n\nBy default, canisters are accessible at `\u003Ccanister-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.\n\nCustom 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 `\u002F.well-known\u002Fic-domains` over HTTP, not just asset canisters. That includes asset canisters, Juno satellites, and custom canisters implementing `http_request`.\n\n## Prerequisites\n\n- A registered domain from any registrar (e.g., Namecheap, GoDaddy, Cloudflare)\n- Access to edit DNS records for that domain\n- A deployed canister that serves `\u002F.well-known\u002Fic-domains` over HTTP (asset canisters, Juno satellites, or any canister implementing `http_request`)\n- `curl` for the registration API calls\n- `jq` (optional, for formatting JSON responses)\n\n## Mistakes That Break Your Setup\n\n1. **Not disabling your DNS provider's SSL\u002FTLS.** 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\u002FSSL\u002FTLS offering from your DNS provider before registering.\n\n2. **Setting a CNAME on the apex domain.** Many DNS providers don't allow CNAME records on the apex (e.g., `example.com` with no subdomain). Use ANAME or ALIAS record types (CNAME flattening) if your provider supports them. Otherwise, use a subdomain like `www.example.com`.\n\n3. **Missing the `_acme-challenge` CNAME.** Without `_acme-challenge.CUSTOM_DOMAIN` pointing to `_acme-challenge.CUSTOM_DOMAIN.icp2.io`, the HTTP gateways cannot obtain a TLS certificate. Registration will fail.\n\n4. **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.\n\n5. **Forgetting the `.well-known\u002Fic-domains` file.** The canister must serve `\u002F.well-known\u002Fic-domains` listing your custom domain. Without it, domain ownership verification fails during registration.\n\n6. **Stale `_acme-challenge` TXT records from your DNS provider.** Previous ACME challenges by your provider may leave TXT records on `_acme-challenge.CUSTOM_DOMAIN` that 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 with `dig TXT _acme-challenge.CUSTOM_DOMAIN`.\n\n7. **Not explicitly registering the domain.** DNS configuration alone is not enough. You must call `POST \u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN` to start registration. It is not automatic.\n\n8. **Setting `HttpAgent`'s `host` to your custom domain.** `host` is 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 `\u002Fapi\u002Fv2`, so pointing `host` at it (or at `window.location.origin`) makes calls fail. You do not need to set `host`: a recent `@icp-sdk\u002Fcore` `HttpAgent` resolves an omitted `host` to `https:\u002F\u002Ficp-api.io` (the mainnet API boundary nodes) on a custom domain. Leave it unset, or set it explicitly to `https:\u002F\u002Ficp-api.io` — never the gateway domain.\n\n9. **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\u002Fii-alternative-origins` **before** the domain goes live. A domain that has already collected sign-ins cannot be repointed without orphaning those accounts. See the `user-sign-in` skill.\n\n## Implementation\n\n### Step 1: Configure DNS Records\n\nAdd three DNS records (replace `CUSTOM_DOMAIN` with your domain, e.g., `app.example.com`):\n\n| Record Type | Host | Value |\n|---|---|---|\n| CNAME | `CUSTOM_DOMAIN` | `CUSTOM_DOMAIN.icp1.io` |\n| TXT | `_canister-id.CUSTOM_DOMAIN` | your canister ID (e.g., `hwvjt-wqaaa-aaaam-qadra-cai`) |\n| CNAME | `_acme-challenge.CUSTOM_DOMAIN` | `_acme-challenge.CUSTOM_DOMAIN.icp2.io` |\n\nSome DNS providers omit the main domain suffix. For `app.example.com` on such providers:\n- `app` instead of `app.example.com`\n- `_canister-id.app` instead of `_canister-id.app.example.com`\n- `_acme-challenge.app` instead of `_acme-challenge.app.example.com`\n\nFor apex domains without CNAME support, use your provider's ANAME or ALIAS record type pointing to `CUSTOM_DOMAIN.icp1.io`.\n\n### Step 2: Create the `ic-domains` File\n\nYour canister must serve `\u002F.well-known\u002Fic-domains` over HTTP. Create this file listing each custom domain on its own line:\n\n```text\napp.example.com\nwww.example.com\n```\n\n**Frontend canister users:** place `.well-known\u002F` inside your `public\u002F` directory (Vite projects) or alongside your source files so it ends up in your `dir`. With the recommended `@dfinity\u002Fstatic-site` recipe, `.well-known\u002F` is uploaded automatically (no config needed). With the legacy `@dfinity\u002Fasset-canister` recipe, ensure `.ic-assets.json5` includes `{ \"match\": \".well-known\", \"ignore\": false }` so the hidden directory gets deployed. See the `static-site` skill for details on file placement.\n\n**Custom `http_request` canisters:** serve the file contents at `\u002F.well-known\u002Fic-domains` directly from your HTTP request handler.\n\n### Step 3: Deploy\n\nDeploy your canister so that `\u002F.well-known\u002Fic-domains` is accessible at `https:\u002F\u002F\u003Ccanister-id>.icp.net\u002F.well-known\u002Fic-domains`.\n\n### Step 4: Validate\n\nCheck DNS records and canister configuration before registering:\n\n```bash\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\u002Fvalidate\" | jq\n```\n\nSuccess response:\n\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Domain is eligible for registration: DNS records are valid and canister ownership is verified\",\n  \"data\": {\n    \"domain\": \"CUSTOM_DOMAIN\",\n    \"canister_id\": \"CANISTER_ID\",\n    \"validation_status\": \"valid\"\n  }\n}\n```\n\nIf validation fails, common errors and fixes:\n\n| Error | Fix |\n|---|---|\n| Missing DNS CNAME record | Add the `_acme-challenge` CNAME pointing to `_acme-challenge.CUSTOM_DOMAIN.icp2.io` |\n| Missing DNS TXT record | Add the `_canister-id` TXT record with your canister ID |\n| Invalid DNS TXT record | Ensure the TXT value is a valid canister ID |\n| More than one DNS TXT record | Remove duplicate `_canister-id` TXT records, keep one |\n| Failed to retrieve known domains | Ensure `.well-known\u002Fic-domains` is deployed and served by the canister |\n| Domain missing from list | Add the domain to the `ic-domains` file and redeploy |\n\n### Step 5: Register\n\n```bash\ncurl -sL -X POST \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\nSuccess response:\n\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Domain registration request accepted and may take a few minutes to process\",\n  \"data\": {\n    \"domain\": \"CUSTOM_DOMAIN\",\n    \"canister_id\": \"CANISTER_ID\"\n  }\n}\n```\n\n### Step 6: Wait for Certificate Provisioning\n\nPoll until `registration_status` is `registered`:\n\n```bash\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\nStatus values: `registering` → `registered` (success), or `failed` (check error message).\n\nAfter `registered`, wait a few more minutes for propagation to all HTTP gateways before testing.\n\n## Updating a Custom Domain\n\nTo point an existing custom domain at a different canister:\n\n1. Update the `_canister-id` TXT record to the new canister ID.\n2. Notify the service:\n\n```bash\ncurl -sL -X PATCH \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\n3. Check status:\n\n```bash\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\n## Removing a Custom Domain\n\n1. Remove the `_canister-id` TXT record and `_acme-challenge` CNAME from DNS.\n2. Notify the service:\n\n```bash\ncurl -sL -X DELETE \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\n3. Confirm deletion (should return 404):\n\n```bash\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\n## HttpAgent Configuration\n\nA frontend served from your custom domain still makes its canister calls through the mainnet **API boundary nodes** (`https:\u002F\u002Ficp-api.io`), not through the domain it is served from. `HttpAgent`'s `host` is that API endpoint — *not* your frontend's origin. The custom domain is the HTTP gateway and does not serve `\u002Fapi\u002Fv2`.\n\nYou do not need to set `host`. When it is omitted, a recent `@icp-sdk\u002Fcore` `HttpAgent` resolves to `https:\u002F\u002Ficp-api.io` on a custom domain (and on `icp.net`). Do **not** point `host` at your custom domain or `window.location.origin` — that is the gateway, so calls would fail.\n\n```typescript\nimport { HttpAgent } from \"@icp-sdk\u002Fcore\u002Fagent\";\n\n\u002F\u002F host omitted on a custom domain → resolves to https:\u002F\u002Ficp-api.io\nconst agent = await HttpAgent.create();\n\n\u002F\u002F equivalent, explicit:\nconst agentExplicit = await HttpAgent.create({ host: \"https:\u002F\u002Ficp-api.io\" });\n```\n\n## Deploy & Test\n\n```bash\n# 1. Deploy your canister with the ic-domains file served at \u002F.well-known\u002Fic-domains\n\n# 2. Validate DNS + canister config\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002Fyourdomain.com\u002Fvalidate\" | jq\n\n# 3. Register\ncurl -sL -X POST \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002Fyourdomain.com\" | jq\n\n# 4. Poll until registered\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002Fyourdomain.com\" | jq\n```\n\n## Verify It Works\n\n```bash\n# 1. Verify DNS records\ndig CNAME yourdomain.com\n# Expected: yourdomain.com. CNAME yourdomain.com.icp1.io.\n\ndig TXT _canister-id.yourdomain.com\n# Expected: \"\u003Cyour-canister-id>\"\n\ndig CNAME _acme-challenge.yourdomain.com\n# Expected: _acme-challenge.yourdomain.com. CNAME _acme-challenge.yourdomain.com.icp2.io.\n\n# 2. Verify ic-domains file is served by the canister\ncurl -sL \"https:\u002F\u002F\u003Ccanister-id>.icp.net\u002F.well-known\u002Fic-domains\"\n# Expected: your domain listed\n\n# 3. Verify registration status is \"registered\"\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002Fyourdomain.com\" | jq '.data.registration_status'\n# Expected: \"registered\"\n\n# 4. Verify the custom domain serves your canister\ncurl -sI \"https:\u002F\u002Fyourdomain.com\"\n# Expected: HTTP\u002F2 200\n\n# 5. Verify no stale ACME TXT records\ndig TXT _acme-challenge.yourdomain.com\n# Expected: no TXT records (only the CNAME)\n```\n","# Custom Domains\n\n## What This Is\n\nBy default, canisters are accessible at `\u003Ccanister-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.\n\nCustom 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 `\u002F.well-known\u002Fic-domains` over HTTP, not just asset canisters. That includes asset canisters, Juno satellites, and custom canisters implementing `http_request`.\n\n## Prerequisites\n\n- A registered domain from any registrar (e.g., Namecheap, GoDaddy, Cloudflare)\n- Access to edit DNS records for that domain\n- A deployed canister that serves `\u002F.well-known\u002Fic-domains` over HTTP (asset canisters, Juno satellites, or any canister implementing `http_request`)\n- `curl` for the registration API calls\n- `jq` (optional, for formatting JSON responses)\n\n## Mistakes That Break Your Setup\n\n1. **Not disabling your DNS provider's SSL\u002FTLS.** 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\u002FSSL\u002FTLS offering from your DNS provider before registering.\n\n2. **Setting a CNAME on the apex domain.** Many DNS providers don't allow CNAME records on the apex (e.g., `example.com` with no subdomain). Use ANAME or ALIAS record types (CNAME flattening) if your provider supports them. Otherwise, use a subdomain like `www.example.com`.\n\n3. **Missing the `_acme-challenge` CNAME.** Without `_acme-challenge.CUSTOM_DOMAIN` pointing to `_acme-challenge.CUSTOM_DOMAIN.icp2.io`, the HTTP gateways cannot obtain a TLS certificate. Registration will fail.\n\n4. **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.\n\n5. **Forgetting the `.well-known\u002Fic-domains` file.** The canister must serve `\u002F.well-known\u002Fic-domains` listing your custom domain. Without it, domain ownership verification fails during registration.\n\n6. **Stale `_acme-challenge` TXT records from your DNS provider.** Previous ACME challenges by your provider may leave TXT records on `_acme-challenge.CUSTOM_DOMAIN` that 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 with `dig TXT _acme-challenge.CUSTOM_DOMAIN`.\n\n7. **Not explicitly registering the domain.** DNS configuration alone is not enough. You must call `POST \u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN` to start registration. It is not automatic.\n\n8. **Setting `HttpAgent`'s `host` to your custom domain.** `host` is 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 `\u002Fapi\u002Fv2`, so pointing `host` at it (or at `window.location.origin`) makes calls fail. You do not need to set `host`: a recent `@icp-sdk\u002Fcore` `HttpAgent` resolves an omitted `host` to `https:\u002F\u002Ficp-api.io` (the mainnet API boundary nodes) on a custom domain. Leave it unset, or set it explicitly to `https:\u002F\u002Ficp-api.io` — never the gateway domain.\n\n9. **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\u002Fii-alternative-origins` **before** the domain goes live. A domain that has already collected sign-ins cannot be repointed without orphaning those accounts. See the `user-sign-in` skill.\n\n## Implementation\n\n### Step 1: Configure DNS Records\n\nAdd three DNS records (replace `CUSTOM_DOMAIN` with your domain, e.g., `app.example.com`):\n\n| Record Type | Host | Value |\n|---|---|---|\n| CNAME | `CUSTOM_DOMAIN` | `CUSTOM_DOMAIN.icp1.io` |\n| TXT | `_canister-id.CUSTOM_DOMAIN` | your canister ID (e.g., `hwvjt-wqaaa-aaaam-qadra-cai`) |\n| CNAME | `_acme-challenge.CUSTOM_DOMAIN` | `_acme-challenge.CUSTOM_DOMAIN.icp2.io` |\n\nSome DNS providers omit the main domain suffix. For `app.example.com` on such providers:\n- `app` instead of `app.example.com`\n- `_canister-id.app` instead of `_canister-id.app.example.com`\n- `_acme-challenge.app` instead of `_acme-challenge.app.example.com`\n\nFor apex domains without CNAME support, use your provider's ANAME or ALIAS record type pointing to `CUSTOM_DOMAIN.icp1.io`.\n\n### Step 2: Create the `ic-domains` File\n\nYour canister must serve `\u002F.well-known\u002Fic-domains` over HTTP. Create this file listing each custom domain on its own line:\n\n```text\napp.example.com\nwww.example.com\n```\n\n**Frontend canister users:** place `.well-known\u002F` inside your `public\u002F` directory (Vite projects) or alongside your source files so it ends up in your `dir`. With the recommended `@dfinity\u002Fstatic-site` recipe, `.well-known\u002F` is uploaded automatically (no config needed). With the legacy `@dfinity\u002Fasset-canister` recipe, ensure `.ic-assets.json5` includes `{ \"match\": \".well-known\", \"ignore\": false }` so the hidden directory gets deployed. See the `static-site` skill for details on file placement.\n\n**Custom `http_request` canisters:** serve the file contents at `\u002F.well-known\u002Fic-domains` directly from your HTTP request handler.\n\n### Step 3: Deploy\n\nDeploy your canister so that `\u002F.well-known\u002Fic-domains` is accessible at `https:\u002F\u002F\u003Ccanister-id>.icp.net\u002F.well-known\u002Fic-domains`.\n\n### Step 4: Validate\n\nCheck DNS records and canister configuration before registering:\n\n```bash\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\u002Fvalidate\" | jq\n```\n\nSuccess response:\n\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Domain is eligible for registration: DNS records are valid and canister ownership is verified\",\n  \"data\": {\n    \"domain\": \"CUSTOM_DOMAIN\",\n    \"canister_id\": \"CANISTER_ID\",\n    \"validation_status\": \"valid\"\n  }\n}\n```\n\nIf validation fails, common errors and fixes:\n\n| Error | Fix |\n|---|---|\n| Missing DNS CNAME record | Add the `_acme-challenge` CNAME pointing to `_acme-challenge.CUSTOM_DOMAIN.icp2.io` |\n| Missing DNS TXT record | Add the `_canister-id` TXT record with your canister ID |\n| Invalid DNS TXT record | Ensure the TXT value is a valid canister ID |\n| More than one DNS TXT record | Remove duplicate `_canister-id` TXT records, keep one |\n| Failed to retrieve known domains | Ensure `.well-known\u002Fic-domains` is deployed and served by the canister |\n| Domain missing from list | Add the domain to the `ic-domains` file and redeploy |\n\n### Step 5: Register\n\n```bash\ncurl -sL -X POST \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\nSuccess response:\n\n```json\n{\n  \"status\": \"success\",\n  \"message\": \"Domain registration request accepted and may take a few minutes to process\",\n  \"data\": {\n    \"domain\": \"CUSTOM_DOMAIN\",\n    \"canister_id\": \"CANISTER_ID\"\n  }\n}\n```\n\n### Step 6: Wait for Certificate Provisioning\n\nPoll until `registration_status` is `registered`:\n\n```bash\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\nStatus values: `registering` → `registered` (success), or `failed` (check error message).\n\nAfter `registered`, wait a few more minutes for propagation to all HTTP gateways before testing.\n\n## Updating a Custom Domain\n\nTo point an existing custom domain at a different canister:\n\n1. Update the `_canister-id` TXT record to the new canister ID.\n2. Notify the service:\n\n```bash\ncurl -sL -X PATCH \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\n3. Check status:\n\n```bash\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\n## Removing a Custom Domain\n\n1. Remove the `_canister-id` TXT record and `_acme-challenge` CNAME from DNS.\n2. Notify the service:\n\n```bash\ncurl -sL -X DELETE \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\n3. Confirm deletion (should return 404):\n\n```bash\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002FCUSTOM_DOMAIN\" | jq\n```\n\n## HttpAgent Configuration\n\nA frontend served from your custom domain still makes its canister calls through the mainnet **API boundary nodes** (`https:\u002F\u002Ficp-api.io`), not through the domain it is served from. `HttpAgent`'s `host` is that API endpoint — *not* your frontend's origin. The custom domain is the HTTP gateway and does not serve `\u002Fapi\u002Fv2`.\n\nYou do not need to set `host`. When it is omitted, a recent `@icp-sdk\u002Fcore` `HttpAgent` resolves to `https:\u002F\u002Ficp-api.io` on a custom domain (and on `icp.net`). Do **not** point `host` at your custom domain or `window.location.origin` — that is the gateway, so calls would fail.\n\n```typescript\nimport { HttpAgent } from \"@icp-sdk\u002Fcore\u002Fagent\";\n\n\u002F\u002F host omitted on a custom domain → resolves to https:\u002F\u002Ficp-api.io\nconst agent = await HttpAgent.create();\n\n\u002F\u002F equivalent, explicit:\nconst agentExplicit = await HttpAgent.create({ host: \"https:\u002F\u002Ficp-api.io\" });\n```\n\n## Deploy & Test\n\n```bash\n# 1. Deploy your canister with the ic-domains file served at \u002F.well-known\u002Fic-domains\n\n# 2. Validate DNS + canister config\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002Fyourdomain.com\u002Fvalidate\" | jq\n\n# 3. Register\ncurl -sL -X POST \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002Fyourdomain.com\" | jq\n\n# 4. Poll until registered\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002Fyourdomain.com\" | jq\n```\n\n## Verify It Works\n\n```bash\n# 1. Verify DNS records\ndig CNAME yourdomain.com\n# Expected: yourdomain.com. CNAME yourdomain.com.icp1.io.\n\ndig TXT _canister-id.yourdomain.com\n# Expected: \"\u003Cyour-canister-id>\"\n\ndig CNAME _acme-challenge.yourdomain.com\n# Expected: _acme-challenge.yourdomain.com. CNAME _acme-challenge.yourdomain.com.icp2.io.\n\n# 2. Verify ic-domains file is served by the canister\ncurl -sL \"https:\u002F\u002F\u003Ccanister-id>.icp.net\u002F.well-known\u002Fic-domains\"\n# Expected: your domain listed\n\n# 3. Verify registration status is \"registered\"\ncurl -sL -X GET \"https:\u002F\u002Ficp.net\u002Fcustom-domains\u002Fv1\u002Fyourdomain.com\" | jq '.data.registration_status'\n# Expected: \"registered\"\n\n# 4. Verify the custom domain serves your canister\ncurl -sI \"https:\u002F\u002Fyourdomain.com\"\n# Expected: HTTP\u002F2 200\n\n# 5. Verify no stale ACME TXT records\ndig TXT _acme-challenge.yourdomain.com\n# Expected: no TXT records (only the CNAME)\n```\n",{"name":5,"license":15,"metadata":48,"description":7,"compatibility":51},{"title":49,"category":50},"Custom Domains","Frontend","curl, DNS registrar access, deployed canister","main","e981a10d43164675beb283a1ad10bc49ade686f1","skills\u002Fchains\u002Fdfinity-official-custom-domains",17,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia","https:\u002F\u002Feth2030.com","Hardcore infra. Building @alt-research and applied cryptography.","2026-11-15 02:28:10",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add jiayaoqijia\u002Fcryptoskill --skill custom-domains",{"tool":67,"command":68},"bunx","bunx skills add jiayaoqijia\u002Fcryptoskill --skill custom-domains",{"tool":70,"command":71},"pnpm","pnpm dlx skills add jiayaoqijia\u002Fcryptoskill --skill custom-domains","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-custom-domains\u002FSKILL.md",true,[75,79,85],{"path":76,"resourceType":76,"resourceTypeDesc":77,"sizeBytes":78,"sourceHtmlUrl":16},"LICENSE","许可证",10770,{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"SOURCE.md","REFERENCE","参考文档",332,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-custom-domains\u002FSOURCE.md",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"TRUST.auto.yaml",2197,"https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fchains\u002Fdfinity-official-custom-domains\u002FTRUST.auto.yaml",[90,100,108,116,124,132],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":95,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":99},"01M7DTKCERMV0RNX3HZJP4CZ26","troves","Deposit and withdraw from Troves DeFi yield vault strategies on Starknet. View available strategies, check positions, and manage vault deposits. Use this skill when the user mentions Troves, vault, yield vault, DeFi vault, strategy, yield farming, vault deposit, vault withdraw, earning yield through vaults, passive yield strategies, or wants to deposit into or withdraw from a yield strategy — even if they don't say \"Troves\" explicitly.","MIT","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-troves\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":99},"01M7DTK6CJSMGC8KCQHGNYFZBD","trade","Swap tokens on Starknet via Fibrous DEX aggregator. Supports per-provider selection (avnu, ekubo, or auto to race all). Use this skill when the user wants to swap, exchange, trade, convert, buy, or sell one token for another on Starknet. Also use when the user asks about token prices, exchange rates, DEX routing, best swap route, or wants to check how much they would receive for a given amount — even if they don't explicitly say \"swap\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-trade\u002FSKILL.md",[],[],{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":112,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":99},"01M7DTJZ6A0X4PAW3Y8W4J9K64","staking","Stake, unstake, claim, and compound rewards for STRK, WBTC, tBTC, SolvBTC, and LBTC on Starknet. View validators, pools, and staking positions. Use this skill when the user mentions staking, delegating, validators, staking pools, rewards, compounding, unstaking, earning yield, passive income on crypto, or wants to earn on their STRK or BTC tokens — even if they don't say \"stake\" explicitly.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-staking\u002FSKILL.md",[],[],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":120,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":99},"01M7DTJSDZJKCDMW7GHRF4BRH5","send","Send STRK, ETH, or any ERC-20 token to a Starknet address. Supports simulation (dry-run) before execution. Use this skill when the user wants to send, transfer, pay, tip, or move tokens to another wallet address on Starknet. Also trigger when the user mentions sending funds to someone, making a payment, transferring assets, or moving crypto to a specific address — even if they just say \"pay 10 STRK to 0x...\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-send\u002FSKILL.md",[],[],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":128,"sourceHtmlUrl":129,"categories":130,"keywords":131,"publishedAt":99},"01M7DTJG1E480D51ZQ7WKDQ26K","portfolio","View a comprehensive DeFi portfolio dashboard and optimize portfolio allocation via automated rebalancing. Use this skill when the user wants an overview, summary, dashboard, total value, net worth, portfolio rebalancing, target allocation, or wants to see all their DeFi positions across Starknet at once. Also trigger when the user asks \"what do I have\", \"show me everything\", \"how much am I worth\", \"my positions\", \"my investments\", \"rebalance my portfolio\", \"I want 50% ETH\", \"optimize my holdings\", or any request for a holistic view of their Starknet holdings — even if they don't explicitly say \"portfolio\".","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-portfolio\u002FSKILL.md",[],[],{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":94,"licenseFileUrl":136,"sourceHtmlUrl":137,"categories":138,"keywords":139,"publishedAt":99},"01M7DTJ7M8TE9R2N36HFBZDGVD","multi-swap","Execute multiple token swaps in a single Starknet transaction via Fibrous (default). Supports per-provider selection (avnu, ekubo, or auto to race all). Supports 2-3 swap pairs bundled into one multicall. Use this skill when the user wants to swap multiple token pairs at once, do batch swaps, execute several trades simultaneously, perform parallel swaps, or do bulk trading in one transaction. Also trigger when the user mentions \"two swaps\", \"three swaps\", \"swap X and Y at the same time\", or wants to convert multiple tokens in a single call.","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjiayaoqijia\u002Fcryptoskill\u002Fblob\u002Fmain\u002Fskills\u002Fmcp-servers\u002Fahmetenesdur-multi-swap\u002FSKILL.md",[],[]]