Skip to content

TON Sites

TON Sites are web services that support an HTTP interface. They use RLDP datagrams over the ADNL protocol to transfer HTTP queries and responses, residing entirely within the TON Network. A TON Site is identified by its ADNL address rather than an IP address, so no IP address appears in the URL or at the HTTP layer.

When a user visits a TON Site:

  1. The TON Proxy client accepts an HTTP request from an ordinary web browser.
  2. The proxy resolves the target address, either through TON DNS (for human-readable .ton domains) or directly from a known ADNL address.
  3. The HTTP request is encapsulated in RLDP datagrams and sent through the ADNL network to the TON Site’s abstract address.
  4. The TON Site processes the request and returns an HTTP response.

Every TON Site is identified by a 256-bit ADNL abstract address derived from its public key. Because the ADNL address is independent of the server’s IP address, a site is not tied to any particular server location.

Hosting a TON Site requires a reverse proxy that accepts inbound ADNL connections and forwards HTTP requests to a local web server. Two implementations are available: rldp-http-proxy from the TON monorepo (manual key generation) and tonutils-reverse-proxy (automatic key generation and domain linking). For setup instructions, see How to set up a reverse proxy.

TON Sites can serve either dynamic content via a conventional HTTP server or static content stored as a bag in TON Storage, with the storage gateway resolving .bag hostnames directly.

A dns_adnl_address record in TON DNS maps a .ton domain name to the ADNL address of the TON Site. The proxy client resolves this record and connects to the correct ADNL address. See TON DNS for the full record type specification.

TON Sites can also be accessed directly by their ADNL address, without DNS resolution.

  • ADNL: the abstract datagram network layer providing transport for TON Sites.
  • RLDP: the reliable large datagram protocol over ADNL for HTTP transfer.
  • TON Proxy: bridges HTTP requests from a conventional browser to the ADNL network.
  • TON DNS: maps .ton domains to ADNL addresses.
  • How to host a TON Site: step-by-step guide to setting up a reverse proxy and linking a domain.