apiton blog
ton.direct: open a TON Site in any browser, on an address of its own
A TON Site lives inside the TON network: the site record of its .ton domain points to an
ADNL server reached over RLDP, or to a
TON Storage bag. An ordinary browser cannot open either on its own.
ton.direct does it for you: https://apiton.ton.direct/ is the TON Site apiton.ton,
https://eatmyshorts.ton.direct/ is eatmyshorts.ton. It has been live since 4 November 2026, and
it is what the View button in Live TON Sites opens.
It is for anyone with a link to a .ton site and no TON proxy, browser extension or wallet with a
TON browser: nothing to install, nothing to sign in to, and the address is an ordinary https link
you can send to anyone. With a TON proxy of your own, requests go from your computer over the TON
network with no gateway in between; see How to open a TON Site.
How a visit works
Take https://apiton.ton.direct/, the TON Site of apiton.org itself:
- Your browser connects over https. ton.direct sits behind Cloudflare, like apiton.org; a plain
http://address is sent to https. The request reaches apiton's gateway, the same one that servessite.apiton.org. - The gateway turns the host into the site's name,
apiton.ton, and keeps the path as it is. - It looks up the domain's
siterecord in apiton's catalog, which reads the DNS records of every.tondomain on-chain. The gateway itself does not read the blockchain during your visit. A domain without asiterecord there gets "Unknown TON Site" (404). - It fetches the page over the TON network, from the site's ADNL server over RLDP or from its TON
Storage bag, with
apiton.tonas the host. - It rewrites links to other
.tonsites, adds its own security headers and answers over https.
A site that is offline or does not answer within 30 seconds gets the gateway's own "unavailable"
page (503). How .ton names resolve is explained in
How TON DNS and TON Sites work.
Every site on an origin of its own
Before ton.direct the gateway worked by path only, https://site.apiton.org/<name>.ton/: all sites
shared one origin on apiton.org's own domain. A script on one TON Site with that origin could set
cookies for apiton.org, register a service worker over the whole gateway or read what other TON
Sites kept in your browser. So every page there runs in a sandbox with an opaque origin, without
cookies, localStorage or IndexedDB. That is safe, but sites that keep state in the browser break,
and a third-party page appears under an apiton.org address.
On ton.direct each site is its own origin, https://<name>.ton.direct, on a domain separate from
apiton.org:
- apiton.org is out of reach. A TON Site cannot read or set apiton.org's cookies or storage, and
its requests to apiton's API at
app.apiton.orgare cross-site. - Sites are kept apart.
localStorage, IndexedDB and the Cache API are per origin: one TON Site cannot read what another stored in your browser, and each gets storage of its own. - No cookies pass through the gateway. It drops the site's
Set-Cookie, never sends your cookies to the site and sets none of its own. - Still blocked: downloads, camera, microphone, location and payments. No page can show a ton.direct site in a frame, and requests for a service worker script are refused.
What an origin of its own does not solve:
- Cookies a script sets for all of ton.direct. ton.direct is not on the Public Suffix List, so a
script on one TON Site can set a cookie for
ton.directthat scripts on other TON Sites can read. Such cookies never reach the gateway. A Public Suffix List entry would close this; it is left for later. - Phishing. A
<brand>.ton.directaddress can look official. ton.direct is apiton's gateway, not a TON service, and apiton does not host or check these sites. Never enter a seed phrase, a private key or a password on one.
Which names get a ton.direct address
A web host name has stricter rules than a .ton name. A name gets https://<name>.ton.direct/ when
it is one DNS label of at most 63 characters (TON allows 126) of a-z, 0-9 and -, with no hyphen
at either end; not www, which ton.direct keeps (a .ton name has at least 4 characters, so no
domain loses its address); and, for a punycode name (xn--…), a host browsers accept: apiton checks
it the way a browser's URL parser does and requires that it converts back to the same name.
On 5 November 2026 this held for 475 of the 476 live TON Sites, including 12 of the 13 punycode
names (Cyrillic words, emoji, keycaps). The exception, xn--vuhdtufv, is written in circled letters
that browsers turn into casino. How a punycode name looks in the address bar is up to the browser:
one that mixes scripts is shown as punycode.
- A name that does not fit opens through the path gateway,
https://site.apiton.org/<name>.ton/, in the sandbox described above. The View button gives that address for such names. - Subdomains such as
a.b.tonorshop.apiton.tonare not served: the catalog holds registered.tondomains, one label each, and the certificate of ton.direct covers one level below it only. ton.directandwww.ton.directredirect to apiton.org's Your website on .ton page.
What the gateway changes in a page
The gateway injects nothing: no banner, no bar, no script. It rewrites links that point to a .ton
address your browser could not open:
- Links to
.tonsites, writtenhttp://x.ton/…,https://x.ton/…,//x.ton/…ortonsite://x.ton/…, becomehttps://x.ton.direct/…(for a name without a ton.direct address,https://site.apiton.org/x.ton/…), in HTML attributes such ashref,srcandsrcset, in meta refresh, in inline styles and in stylesheets. - Redirects follow the same rule, and a root-relative one stays as it is:
https://eatmyshorts.ton.direct/redirects to/qr/, the page that site opens on, and stays oneatmyshorts.ton.direct.
Root-relative and relative links (/style.css, about.html) are left alone: the site owns its
origin, so they simply work, where the path gateway has to prefix them with /<name>.ton. Links to
the ordinary web are left alone too and take you there directly, not through apiton. Scripts are not
touched, so URLs a script builds while the page runs are not rewritten.
What ton.direct does not open
- Restricted sites. TON Sites about drugs, weapons, gambling, adult content, fraud or other illegal content (piracy, tobacco, vape and snus sales, personal-data lookups, calls for political sabotage or violence), and shops that look illicit but could not be verified, are listed by name and reason in Restricted TON Sites and never opened. ton.direct answers them with 451 and the reason, for example "apiton lists this TON Site by name only and does not open it: gambling." They have no View button and no screenshot.
- Taken-down sites get 451 as well, within 30 seconds of the takedown, and on ton.direct the answer also tells the browser to clear that site's cache and storage. To report a site, see takedown requests.
- Anything but reading. Only
GETandHEADpass (others get 405): forms that send data, logins and carts do not work. - Other file types. HTML, CSS, JavaScript, JSON, text, images, fonts, video, WebAssembly and PDF pass; archives and other downloads get 415. One answer is at most 10 MB.
Privacy
- The TON Site sees apiton's gateway, not you. Only a few request headers are passed on
(
Accept,Accept-Language,Range,If-*), with the gateway's own User-Agent. Your IP address, your browser's User-Agent and your cookies are not sent to the site. - What apiton keeps. The gateway logs only the site's name, the status and the time: no full address, no IP. apiton's web server keeps no access log for ton.direct. Your IP is held in memory only, for the per-visitor rate limit and to count one open of a site per visitor per day; what is stored is the number of opens per site per day, which feeds the rank of Live TON Sites.
- Caching. Pages that pass through the gateway are cached for at most ten minutes, HTML for at most a minute. Requests reach apiton through Cloudflare, as on apiton.org.
ton.direct and the Live TON Sites directory
- View in Live TON Sites, Recently live and the home page, and
View site on a domain's page, for example apiton.ton, open
https://<name>.ton.direct/in a new tab; apiton.org stays open in the old one. The button appears only for a site apiton's regular check has found live and that is not restricted or taken down: how apiton finds and ranks sites. - Browsing apiton.org as the TON Site
apiton.tonthrough a TON proxy, View goes straight tohttp://<name>.ton/: your proxy opens it with no gateway in between. - The old viewer address,
/domain/<name>.ton/site, redirects to the same place. The View site button of @apitonBot uses it, so it lands on ton.direct too. - In the API, the site's
gateway_urlinv2.Nft/Domainandsite_gateway_urlinv2.Catalogrows hold the same address, empty for a site that is not live, taken down or restricted. Use the value as it is; do not build it yourself.
For site owners
- Your site is served as it is. Nothing is added; only links and redirects to
.tonhosts are rewritten. The gateway asks for the same path withHost: <name>.tonand the User-Agentapiton-tonsite-gateway/1 (+https://apiton.org). - Prefer relative and root-relative links. Absolute links to your own
http://<name>.ton/are rewritten; links built by JavaScript are not. - No cookies and no forms. Your
Set-Cookieis dropped, no cookie reaches your server and onlyGETandHEADpass, so a server-side session or aPOSTdoes not work through the gateway. - Your headers. The gateway sets its own security headers and
Cache-Controland keeps only content headers such asContent-Type,ETagandLast-Modified; your CSP,X-Frame-Options, CORS andSet-Cookieheaders are dropped. Other TON Sites on ton.direct may embed your files, pages on the ordinary web may not. - Search engines. ton.direct answers
robots.txtitself, withDisallow: /, and marks every answernoindex. - Limits. 10 MB and 30 seconds per answer, HTML and CSS up to 2 MB, at most 8 requests at a time to one site.
- When your site appears. ton.direct serves a domain once apiton's catalog has read its
siterecord, some time after you set it; the View button follows once the regular check has found the site live. - No TON server of your own? With an ordinary website and a
.tondomain, Your website on .ton serves the website as the domain's TON Site for 1 GRAM (1 💎) per 30 days, and once it is live it opens through ton.direct like any other: Put your website on your .ton domain.
To check a domain's owner, expiry and TON Site in Telegram, send its name to @apitonBot.