How to Launch your Web3 Website on TON

From TON Wiki (En)

The Open Network (TON) is a blockchain platform that supports Web3 applications, including decentralized websites hosted on its infrastructure. Launching a Web3 website on TON involves acquiring a .ton domain, configuring a wallet for blockchain interactions, hosting content through decentralized methods, and ensuring user accessibility.

Obtaining a .ton Domain

TON operates a domain name system that provides .ton domains—human-readable addresses linked to blockchain elements such as smart contracts, wallets, or decentralized websites. The registration process integrates with TON’s decentralized environment and includes the following steps:

  1. Visit the TON domain registry or a supported third-party platform to begin.
  2. Connect a TON-compatible wallet to manage blockchain transactions.
  3. Check the availability of the desired .ton domain using the registry’s search function.
  4. Register the domain with Toncoin ($TON), TON’s native cryptocurrency, via a smart contract transaction if available.
  5. Configure the domain to connect to a Web3 website through a hosting solution or smart contract.

This process ties the domain efficiently into TON’s ecosystem.

Configuring a TON Wallet

A wallet is necessary to interact with the TON blockchain, enabling domain registrations, smart contract deployments, and transaction management. The setup process includes:

  1. Select a TON-compatible wallet, such as Tonkeeper or MyTonWallet, based on specific needs.
  2. Download and install the wallet software, then create a new wallet or import an existing one.
  3. Securely store the seed phrase generated during setup as a recovery mechanism.
  4. Deposit $TON into the wallet, obtained via a cryptocurrency exchange or peer-to-peer transfer.

This prepares the wallet for full engagement with TON’s features.

Hosting a Web3 Website on TON

TON utilizes decentralized hosting methods instead of traditional centralized servers, offering options suited to various website requirements. These methods include:

TON Storage

A peer-to-peer network for hosting static content.

  • Install the TON Storage client software.
  • Upload files such as HTML, CSS, JavaScript, and media.
  • Obtain a cryptographic hash identifying the content.
  • Link the hash to the .ton domain for access.

Smart Contracts

Used for dynamic website functionality.

  • Write code using TON-specific languages like FunC or Tact.
  • Compile the code into an executable format.
  • Deploy it to the TON blockchain using a wallet or development tools.
  • Set the .ton domain to resolve to the contract.

TON Sites

A framework for static or semi-dynamic websites.

  • Prepare files for deployment.
  • Upload them to the TON Sites network.
  • Connect the .ton domain to the hosted content.

These options—TON Storage, smart contracts, and TON Sites—provide flexibility within TON’s infrastructure.

Tonkeeper browser.png

Ensuring Accessibility of the Website

Since .ton domains are not recognized by standard DNS systems, specific tools are required to access TON-based websites. Available methods include:

  • TON-compatible browsers, such as Tonkeeper Browser, which natively support .ton domains.
  • Browser extensions, such as the TON Wallet extension, which allow standard browsers to resolve .ton domains.
  • Web gateways, such as ton.surf, which enable access through conventional browsers without additional setup.
  • Custom DNS resolvers, configurable by advanced users to recognize .ton domains.
  • TON proxy services, which offer decentralized access by bypassing traditional DNS.

These tools ensure .ton websites are accessible to users of varying technical skill levels.

Security Measures

Securing a Web3 website on TON requires protecting its components across multiple aspects. Key measures include:

For Smart Contracts

  • Conduct audits to detect and resolve code vulnerabilities.
  • Use pre-verified templates to minimize errors.
  • Implement access control mechanisms to block unauthorized changes.

For .ton Domains

  • Verify configuration for correct resolution.
  • Apply multi-signature authentication to strengthen ownership security.

For TON Wallet

  • Store private keys in a hardware wallet or secure offline environment.
  • Enable two-factor authentication for additional protection.
  • Keep the seed phrase and private keys confidential.

For TON Storage

  • Encrypt sensitive files prior to upload.
  • Distribute files across multiple nodes to prevent data loss.
  • Confirm integrity with cryptographic hashes.

Links

  1. Wallets on TON
  2. TON Storage Technical Guide
  3. TON Sites Deployment Overview