Skip to main content

Assign a TON domain to a TON Storage bag

  1. Create and upload a bag and copy its bag ID <BAG_ID> (64-character hex).
  2. Open Google Chrome.
  3. Install a wallet browser extension:
  4. Import the wallet that owns the domain using the recovery phrase.
  5. Go to dns.ton.org, open the domain, and select Edit.
  6. Paste <BAG_ID> into the Storage field and save.

Host a static TON Site from TON Storage

  1. Place the static site files in a folder that includes index.html.
  2. Create a bag from the folder and upload it. Copy the bag ID.
  3. Install TON Wallet or MyTonWallet in Chrome and import the domain owner’s wallet.
  4. Go to dns.ton.org, open the domain, and select Edit.
  5. Paste <BAG_ID> into the Site field, choose Host in TON Storage, and save.

Migrate NFT content to TON Storage

For the standard NFT collection contract, update the content prefix by sending a message from the collection owner’s wallet to the collection contract.
  • Old prefix example: https://mysite/my_collection/
  • New prefix format: tonstorage://<BAG_ID>/
After updating the prefix, upload refreshed metadata to TON Storage using the new bag ID.

Low-level DNS records for TON Storage

Assign a bag to the DNS record with key sha256("storage"):
dns_storage_address#7473 bag_id:uint256 = DNSRecord;
Assign a static site bag directly to the DNS record with key sha256("site"):
dns_storage_address#7473 bag_id:uint256 = DNSRecord;