kamakiri domain

Custom domains explains the roles, the DNS records and the order to run these verbs in.

kamakiri domain register

kamakiri domain register <domain> [--no-wait]
$ kamakiri domain register example.com

Publish this DNS record to prove ownership:
  TYPE  NAME                          VALUE
  TXT   _kamakiri-verify.example.com  kamakiri-verify=mfrggzdfmztwq2lknnwg23tp
  Add this value; keep any other `_kamakiri-verify` value already there.

  Add the TXT record above at your registrar, then come back.
  Safe to close any time (Ctrl-C). Re-run `kamakiri domain register example.com` or `kamakiri domain list` to resume.

✓ domain verified: example.com
Now run `kamakiri domain set example.com` to point a site at it.
$ kamakiri domain register example.com

所有権を証明するため、次のDNSレコードを公開してください:
  種別  名前                          宛先
  TXT   _kamakiri-verify.example.com  kamakiri-verify=mfrggzdfmztwq2lknnwg23tp
  この値を追加してください。既にある他の `_kamakiri-verify` の値はそのまま残してください。

  上記のTXTレコードをレジストラで追加したら、戻ってきてください。
  いつでも閉じて構いません (Ctrl-C)。`kamakiri domain register example.com` または `kamakiri domain list` を再実行すると再開できます。

✓ ドメインを確認しました: example.com
次に `kamakiri domain set example.com` を実行してサイトを割り当ててください。

Registration belongs to the account, so the command needs no linked site and runs from any directory.

Re-running it is safe. For a name still awaiting verification it restarts the check, and the value you published stays valid. A registration still unverified 72 hours after you made it is dropped, and running the command again then issues a new value. For a name one of your verified registrations already covers there is nothing to publish, and it prints ✓ example.com is already registered. or ✓ www.example.com is already covered by your verified registration of example.com.

kamakiri domain unregister

kamakiri domain unregister <domain>
$ kamakiri domain unregister example.com
✓ Unregistered example.com.
$ kamakiri domain unregister example.com
✓ example.com のドメイン登録を解除しました。

Like register, it needs no linked site. Unregistering a name you do not hold succeeds. While one of your sites still uses a hostname under the registration it is refused with Error: example.com is in use by one of your sites; remove it from that site first. Take the hostname off with unset or remove, then retry.

kamakiri domain set

kamakiri domain set <domain> [--no-wait]
$ kamakiri domain set example.com
✓ Canonical domain set: example.com

Configure your DNS:
  Required records (pick ONE option):

    Option A: ALIAS or ANAME (if your DNS provider supports it)
      example.com  ALIAS  → fzks-qpb6r87d79wfblfj.c1.kamakiri-pages.site.

    Option B: A records
      example.com  A  → 198.51.100.10
      example.com  A  → 198.51.100.11

    Both options work. ALIAS/ANAME is slightly more convenient (CDN
    changes don't require DNS edits); A records work everywhere,
    including providers that don't support ALIAS/ANAME. If you don't
    know which your provider supports, A records are the safe choice.


example.com
  Add the DNS record above at your registrar, then come back.
  Safe to close any time (Ctrl-C). Re-run `kamakiri domain verify example.com` or `kamakiri status` to resume.

✓ domain linked on our side
✓ DNS propagated (~12m)
✓ SSL certificate provisioned (~30s)
✓ live: https://example.com
$ kamakiri domain set example.com
✓ 正規ドメインを設定しました: example.com

DNSを設定してください:
  必要なレコード(いずれか1つを選択):

    選択肢A: ALIAS または ANAME(DNSプロバイダーが対応している場合)
      example.com  ALIAS  → fzks-qpb6r87d79wfblfj.c1.kamakiri-pages.site.

    選択肢B: Aレコード
      example.com  A  → 198.51.100.10
      example.com  A  → 198.51.100.11

    どちらの方法でも動作します。ALIAS/ANAME の方が少し便利です(CDNを
    変更してもDNSの編集が不要になります)。Aレコードはどの環境でも動作し、
    ALIAS/ANAME に対応していないDNSプロバイダーでも使えます。どちらに
    対応しているか分からない場合は、Aレコードを選べば確実です。

  上記のDNSレコードをレジストラで追加したら、戻ってきてください。
  いつでも閉じて構いません (Ctrl-C)。`kamakiri domain verify example.com` または `kamakiri status` を再実行すると再開できます。

✓ ドメインをこちら側でリンクしました
✓ DNSの反映を確認しました(約12分)
✓ SSL証明書を発行しました(約30秒)
✓ 公開中: https://example.com

(ブラウザでエラーが表示される場合、お近くまでDNSが反映されていない可能性があります)

Sets the canonical domain of the site linked to the current directory. The change applies immediately and needs no deploy, though the domain cannot go live until the site has one. The hostname needs a verified registration of yours that covers it; without one the command changes nothing and prints Domain not registered. Run "kamakiri domain register example.com" first.

Re-running it with the same domain changes nothing and resumes the watch. On a domain that is already live the milestones print at once, without timings. Running it with a different domain replaces the canonical, and the old one comes off the site. A hostname the site already carries as a redirect or an alias is promoted in place and keeps its DNS target.

kamakiri domain unset

kamakiri domain unset [--no-wait]
$ kamakiri domain unset
✓ domain removed on our side
$ kamakiri domain unset
✓ ドメインをこちら側で削除しました

Removes the canonical domain, and the site goes back to serving at its kamakiri-pages.jp address. It is refused while the site has redirects: remove those first.

kamakiri domain add

kamakiri domain add <domain> [--redirect [--status N] | --alias] [--no-wait]
$ kamakiri domain add www.example.com
✓ Domain added: www.example.com (redirect 301)

Configure your DNS:
  www.example.com  CNAME  → h1lc-qpb6r87d79wfblfj.c1.kamakiri-pages.site.

www.example.com
  Add the DNS record above at your registrar, then come back.
  Safe to close any time (Ctrl-C). Re-run `kamakiri domain verify www.example.com` or `kamakiri status` to resume.

✓ domain linked on our side
✓ DNS propagated (~12m)
✓ SSL certificate provisioned (~30s)
✓ live: https://www.example.com
$ kamakiri domain add www.example.com
✓ ドメインを追加しました: www.example.com (redirect 301)

DNSを設定してください:
  www.example.com  CNAME  → h1lc-qpb6r87d79wfblfj.c1.kamakiri-pages.site.

  上記のDNSレコードをレジストラで追加したら、戻ってきてください。
  いつでも閉じて構いません (Ctrl-C)。`kamakiri domain verify www.example.com` または `kamakiri status` を再実行すると再開できます。

✓ ドメインをこちら側でリンクしました
✓ DNSの反映を確認しました(約12分)
✓ SSL証明書を発行しました(約30秒)
✓ 公開中: https://www.example.com

(ブラウザでエラーが表示される場合、お近くまでDNSが反映されていない可能性があります)

A redirect needs the site’s canonical domain set first, and the hostname needs a verified registration of yours that covers it, as with set. Re-running it for a hostname the site already carries succeeds, and a changed role or code is applied in place with the same DNS target. The canonical domain itself is refused: set and unset manage it.

kamakiri domain remove

kamakiri domain remove <domain> [--no-wait]
$ kamakiri domain remove www.example.com
✓ domain removed on our side
$ kamakiri domain remove www.example.com
✓ ドメインをこちら側で削除しました

Removes a redirect or an alias from whichever of your sites carries it, not only the linked one, though the command still needs a linked site to run. A canonical domain is refused: unset removes it.

kamakiri domain verify

kamakiri domain verify <domain> [--no-wait]
$ kamakiri domain verify www.example.com
Re-checking www.example.com...

Configure your DNS:
  www.example.com  CNAME  → h1lc-qpb6r87d79wfblfj.c1.kamakiri-pages.site.   ⧗ not yet visible

✓ DNS propagated (~4m)
✓ SSL certificate provisioned (~20s)
✓ live: https://www.example.com
$ kamakiri domain verify www.example.com
www.example.com を再確認しています...

DNSを設定してください:
  www.example.com  CNAME  → h1lc-qpb6r87d79wfblfj.c1.kamakiri-pages.site.   ⧗ まだ検出されていません

✓ DNSの反映を確認しました(約4分)
✓ SSL証明書を発行しました(約20秒)
✓ 公開中: https://www.example.com

Has the domain checked again within about a minute, then watches it until it is live. Use it to resume a watch you stopped, or to bring back a domain that has dropped out of service. While the domain is not serving, the records come first, each with the value last seen in DNS.

When the name is not on the site but you hold a registration awaiting verification at exactly that name, it checks the registration instead and shows the TXT record. The match is exact: with only example.com registered, verify www.example.com checks a hostname on the site.

A manual check is rate-limited. Asking again too soon prints Error: you've checked very recently. Automatic checks continue in the background. Try again in a moment and exits 1.

kamakiri domain list

kamakiri domain list
$ kamakiri domain list
DOMAIN         STATUS                 SITES
example.com    verified               example.com (canonical), www.example.com (redirect 301)
example.jp     verified               example.jp (alias)
staging.dev    awaiting verification  -
$ kamakiri domain list
ドメイン       状態                   サイト
example.com    確認済み               example.com (canonical), www.example.com (redirect 301)
example.jp     確認済み               example.jp (alias)
staging.dev    確認待ち               -

Lists every registration on your account, across all your sites, and needs no linked site. With none it prints No domains registered. Run `kamakiri domain register <domain>` to register one. The DNS and certificate health of one site’s domains is in kamakiri status.

Waiting

A wait has no time limit. --no-wait returns once the request is accepted. When standard output is not a terminal, register, set, add and verify print the records and return as they do under --no-wait, since what they wait for is a record only you can publish. unset and remove still wait there.

Ctrl-C stops only the watching, and setup carries on. Resume a set, add or verify watch with kamakiri domain verify <domain> or kamakiri status, from any machine. Resume a register watch by running it again. kamakiri domain list shows whether it has verified. Ctrl-C during unset or remove leaves the removal running, and kamakiri status shows when it is done.

Exit status

The refusals that exit 1, per verb:

When another site already serves a hostname and that site is yours, take the hostname off it there first.