apiton guide
Put your website on your .ton domain
A TON Site usually needs a server inside the TON network: an
ADNL node that answers over RLDP. If you already
have an ordinary website (https://shop.example.com) and a .ton domain (shop.ton), apiton can be
that node for you: its customer node answers http://shop.ton/ and takes every page from your
website. There is no account and you never hand over a key.
What you need
- A website that works over https: apiton checks that it answers the way its node will ask for it — no file to upload and no DNS record to add.
- The wallet that owns the
.tondomain: you connect it on the page, it pays, and the same transaction points the domain'ssiterecord at apiton's node. - The price of a period in 💎 plus about 0.05 💎 for the record (it stays on the domain and renews it for a year). The price, the period and the limits are on the order page.
No .ton domain? A name under apiton.ton
When the order page shows a price for a name under apiton.ton, you can skip the
domain: choose "take a name under apiton.ton" after connecting a wallet, or enter a name like
shop.apiton.ton instead of a domain (one name of 4 to 63 letters, digits or -; names apiton
keeps, like www, api, docs or wallet, are refused). Every name under apiton.ton already
points at apiton's node, so there is no NFT and no record to set. The website is checked the same
way (step 3), and the payment is a single message that any wallet may send: the first payment
claims the name for your order for as long as it is paid, and when the order ends the name is free
again. Such a site opens at http://shop.apiton.ton/ with a TON proxy or a TON browser; it does not
open through ton.direct and is not listed in Live TON Sites yet.
1. Connect the wallet and choose the domain
Open Your website on .ton and press Connect wallet: connect the wallet that
holds your domain with TON Connect. The form lists the .ton domains apiton's catalog knows in that
wallet; pick yours. Nothing is sent from the wallet at this point. A domain that is missing from the
list — the catalog can lag behind the chain — can be typed by hand, and the form works without
connecting a wallet at all: type the domain.
2. Enter the website and check
Enter the website — the address of the site itself, https://…, without a path — and press
Check. apiton tells you whether the pair can be served and, if not, why in plain words: the
website must be https, the domain must not be on sale or expired, names that look like a wallet or an
exchange are refused. With a wallet connected, the page also says whether that wallet owns the domain
on the chain: the first payment must come from the owner. Nothing is written yet.
3. Make the order: the website check
Press Make the order. apiton then asks for your home page (or the start page you gave) the way its
node will, from 185.217.124.43:
- it must open over https with a valid certificate and answer with a web page (
text/html); - a redirect to another path of the same host is fine; a redirect to another host is not — the
visitor would leave the
.tonsite, so give that host as the website instead; - no Cloudflare challenge or block page in the way (see below);
- not larger than one response may be, and nothing the terms forbid.
The next page shows the manage secret once: copy it somewhere safe. You need it to stop the order; apiton keeps only its hash. When the website passes, that page is the payment already. When it does not, the order page says why, and Check now runs the check again once you have fixed it; an order that never passes is deleted after a day. apiton checks the website again every day while the order runs and pauses the site after three failed checks in a row.
4. Pay with TON Connect
The pay page opens right after the order, with the wallet you connected. Confirm one transaction of
two messages: the payment with the order's comment and the domain's site record set to apiton's
node. A wallet that signs one message at a time gets two transactions instead. The page refuses to
send from another wallet: the first payment is what binds the order to the domain's owner.
Without TON Connect, pay by the ton:// link or the QR code on the same page — with the comment —
and set the record on dns.ton.org to the ADNL id shown there. If the payment
arrived but the record did not, the order page waits for it and shows how to set it by hand.
5. Live
Once the payment and the record are on the chain, the site opens at http://<domain>.ton/ with a
TON proxy or a TON browser, and it shows up in Live TON Sites
like any other. A renewal may come from any wallet and adds to the time left. Follow the order in
@apitonBot for a message when it goes live, when a check fails and before
the paid period ends.
Your website behind Cloudflare
It works when Cloudflare lets apiton's server through. Everything apiton asks of your website —
the check before the payment, the daily checks after it, and every page of the .ton site — comes
from one address, 185.217.124.43. When Cloudflare answers it with a challenge or a block page,
the order page says upstream_challenge, and visitors of the .ton site would get that page instead
of yours — so an order whose home page Cloudflare challenges waits, unpaid, until the page comes
through.
- Allow the address: an IP Access rule for
185.217.124.43with the action Allow. All visitors of the.tonsite reach you from this one address, so per-IP rate limits would count them as one client; the rule lifts them too.Bot Fight Modecannot be skipped by custom rules, but Cloudflare documents that it does not trigger on a request an IP Access rule matched first. On a plan with custom rules, add one forip.src eq 185.217.124.43with the action Skip: the remaining custom rules, rate limiting rules, managed rules andSuper Bot Fight Moderules, and the productsBrowser Integrity Check,Security LevelandHotlink Protection. - No challenge in front of the whole site:
Bot Fight Mode,Super Bot Fight Modechallenging automated traffic,I'm Under Attack, a rule with a JS or managed challenge on every page, or a Turnstile gate before the site stop apiton's node. Skip them for the address above or keep them off; if challenges go on with the rule in place, turnBot Fight Modeoff. - No Cloudflare Access (Zero Trust) application on the website's host name: its login page is all the node would get.
Hotlink Protectionoff or skipped: a visitor's browser names the.tonaddress as the referrer, and Cloudflare would refuse the pictures.- By user agent only apiton's checks can be recognised:
apiton-verify/1 (+https://apiton.org/sites/proxy/). The node passes on the visitor's own user agent (through the ton.direct gateway,apiton-tonsite-gateway/1 (+https://apiton.org)), so allow by the address, not by the agent. - Fine as they are: Cloudflare's cache,
Always Use HTTPS(the node always asks over https) and the speed settings. The node sends onlyGETandHEADand does not rewrite pages: keep links relative (/about/, nothttps://shop.example.com/about/), or a visitor leaves the.tonsite; forms that send data do not work.
After a change, press Check now on the order page.
What does not work
Only GET and HEAD are relayed and pages are not rewritten: forms, logins and carts do not work,
absolute links to your website lead to the ordinary web, and Secure cookies are refused over
http://. It is for static pages — business cards, documentation, landing pages. The rules and
what is not allowed are in the terms.