How to host a website on a .ton domain
Two ways to put a website on a .ton name: TON Storage or your own server.
Host a TON Site
A static site on TON Storage
- Put the site in a folder with an
index.htmland create a bag from it with tonutils-storage or the official storage daemon. Copy the Bag ID it prints. - Keep the bag shared: leave the storage node running, or pay a storage provider to hold it. A bag nobody shares does not open.
- Under My names, open the name. In its Website record choose A TON Storage bag and paste the Bag ID (not the separate TON Storage record, which the gateway does not read). It opens at
your-name.ton.website.
Your own server
- Run the site on the server at
http://127.0.0.1:80. Any web server or app works. - Run tonutils-reverse-proxy next to it and sign the DNS change it shows in your wallet: ./tonutils-reverse-proxy-linux-amd64 --domain your-name.ton
- Open
your-name.ton.website. Keep the proxy running; without--domainthe site still opens by its ADNL address at<address>.adnl.website.
To link a name later, or another name to the same server, set its Site record to the ADNL address the proxy prints: under My names, which takes the address as printed. Running it as a service, the tunnel mode, the request headers the proxy adds: see the proxy's README and the TON documentation.
The three addresses
- ton.website
- The main address.
alice.tonopens atalice.ton.website, a subdomain likeblog.alice.tonatblog.alice.ton.website, and a Telegram usernamealice.t.meatalice-tg.ton.website. Subdomains open here only (see the FAQ). - ton.run
- A shorter alias for .ton names and Telegram usernames:
alice.ton.run. Subdomains are not served here. - adnl.website
- Opens a server by its ADNL address, with no .ton name at all:
<address>.adnl.website. Useful for a site that has no name yet.
Glossary
- TON Site
- A website served over the TON network instead of the public internet. A
.tonname points at it through asiteDNS record. - ADNL
- The TON network's addressing and transport layer. An ADNL address identifies the server a TON Site runs on. One server can host many names.
- TON Storage
- TON's file-sharing network. A site can be a static bundle stored there instead of a running server.
- Bag ID
- The identifier of a TON Storage bundle. A
siterecord can hold a Bag ID instead of an ADNL address; such a site opens only while some peer is sharing the bag. - site record
- The DNS record that makes a
.tonname open as a website. It is the only record the gateway reads to open a site. - next_resolver
- A DNS record that delegates a name's subdomains (e.g.
nft.minter.ton) to another contract. - two-level subdomain
- A name like
blog.alice.ton, resolved through its parent'snext_resolver. - RLDP
- The protocol TON Sites use to carry HTTP over ADNL.
- A server that holds 20 or more names in this directory, usually parked or for-sale pages. They go up and down together and are listed after independent sites.
General on-chain terms (wallet, jetton, NFT, DNS item) are in the tonscan.info glossary.
FAQ
Why won't a site open?
The gateway only relays: if the site's own server is offline, or no peer is sharing its TON Storage bag, there is nothing to relay. The error page says what it saw. The directory re-checks every listed site each week, so a site that stays down drops out.
Why is the first load slow?
The first request to a site has to find it on the TON network and open a connection: measured at 5–12 seconds for a cold render. After that the page is cached at the edge and loads like any other website.
How do I get my site into the directory?
Nothing to submit: the weekly scan reads TON DNS names from the chain and lists the ones that answer with a real page. To pick your topic, add <meta name="ton2web:category" content="blog"> to your page (values: defi, wallet, game, nft, shop, media, tool, docs, social, blog, personal).
Do subdomains like blog.alice.ton open?
Yes, on ton.website: blog.alice.ton opens at blog.alice.ton.website. A .ton name's owner can hand out names under it, each with its own site record. Every subdomain needs a certificate of its own, so the gateway finds them itself: each week it reads every subdomain collection on chain, each day it asks every subdomain that has a site record, and it adds a certificate for each one that answers. A new subdomain usually opens within a week of first serving. How many there are.
What does hosting cost?
The software is free. A server costs what a small VPS costs; a static site on TON Storage needs no server, only someone sharing the bag. A .ton name is bought at auction, paid in GRAM: look it up under Names and place the first bid.
Where do I see who holds a name, or when it must be renewed?
Each site page here shows who held the name and its renewal deadline as of the weekly scan. For live data, past owners, auctions and every DNS record, see tonscan.info, the on-chain explorer. Every site page links to it.