How to put your domain on an awx computer with the wizard
A domain you own can open a web page that runs on an awx computer. The Set up a domain wizard takes you through it one step at a time and checks each step. Here is a real run.
We used a domain of ours, mypksk.com, twice: first the subdomain app.mypksk.com, then the bare domain mypksk.com itself. Both open small web pages on one awx computer, and the domain's DNS is at Cloudflare. If your DNS is somewhere else, the awx steps are the same, and only the screens in the DNS part look different.
At a glance, for app.yourname.com. Every value comes from the wizard, with a Copy button.
| Type | Name | Points to | When |
|---|---|---|---|
| CNAME | app | customers.awanbox.com, DNS only | at the start |
| TXT | _cf-custom-hostname.app | a value that shows the domain is yours | at the start |
| TXT, two of them | _acme-challenge.app | one value each, for the padlock | once the first two are seen |
For the bare domain yourname.com, drop the app: the CNAME's name is @. Ours went live about ten minutes after the first record.
What you start with
- A computer with a web server running on a port. Ours serves one page on port 8000.
- A domain you own, and access to its DNS settings.
- The paid plan, for your own domain. A name such as
myapp.awanbox.comworks on every plan, and the wizard makes those too.
Open the wizard from the computer's Links and domains tab (the Step-by-step setup button on Custom names or Own domain), or go to box.awanbox.com/#/domain.
Step 1: choose what you want
You pick one of two kinds of address. A name on awanbox.com is ready at once. Your own domain needs a few DNS records. The option you cannot use yet is greyed out, with the reason beside it.
Step 2: the computer and the port
Choose the computer and type the port your web server listens on. Press Check. The wizard looks at three things: the computer is running, the port can be shared, and something answers on it.
Step 3: your domain
Type the domain and press Check (or Enter). A subdomain such as app.yourname.com works with every DNS provider, so start there. A bare domain such as yourname.com also works, but it needs a special record that some providers do not offer, and the wizard warns you about that here.
Step 4: add it
The wizard shows what it is about to do. Press Add domain. awx sets up the address on its side first. Nothing changes at your domain yet.
Step 5: the DNS records
Now the wizard lists the records to add at your domain. The name and the value each have a Copy button, and the last column says whether the record can be seen yet.
We added them in Cloudflare. Open the domain, go to DNS, then Records, and press Add record.
The CNAME. Choose the type CNAME, type app as the name, and customers.awanbox.com as the target. Turn the proxy off, so that it says DNS only. Then press Save.
The TXT record. Add a second record of the type TXT. The name is _cf-custom-hostname.app and the content is the value from the wizard. Use Copy, so there are no typing mistakes.
The wizard looks up your public DNS every 20 seconds, so it picks the records up without a click. Once the domain is checked, two more TXT records appear. They let the padlock (the HTTPS certificate) be issued. Add them the same way: the name is _acme-challenge.app for both, and each has its own value.
The wizard works on a phone too, if you add the records from a phone app. Each record gets its own box, with the name and the value in separate boxes, each with Copy.
This is what the DNS list looked like in the end: the CNAME, the ownership record and the two certificate records.
Step 6: it is live
Now it is waiting. Records take a few minutes to spread, and then the certificate is issued. You can leave the page open, or close it and come back: a domain that is not live yet has an Open the guide button on the computer's Own domain tab. Ours went live about ten minutes after we added the first record.
Open the address. It shows the page from the computer, with a padlock.
Like any other link, it works while the computer is on. When the computer sleeps, visitors see a note that it is not running. To keep it up all the time, turn on Never stop it for being idle in the computer's Settings.
The bare domain too
Then we ran the wizard again for mypksk.com, with the second page on a second port (8001). The page on port 8000 is app.mypksk.com. Both pages link to each other and to this post.
Two things are different for a bare domain. The CNAME goes at the root of the domain, so in Cloudflare its name is @. This works because Cloudflare flattens a CNAME at the root, and other DNS providers call the same thing ALIAS or ANAME. And the wizard cannot see that record from outside, because the root of a domain answers with addresses, so the Seen column says so and goes on to the next check.
In Cloudflare, add the CNAME with the name @, the target customers.awanbox.com, and the proxy off.
The two TXT records have the same shape as before, without the app: the ownership record is named _cf-custom-hostname, and the two certificate records are both named _acme-challenge. This is the DNS list of the domain with both addresses added.
Both addresses open their own page.
app.mypksk.com. The first link leads to this post.
mypksk.com, a second small web server on the same computer.To keep both pages up all the time, we turned on Never stop it for being idle in the computer's Settings, and added each web server as a service on the Links and domains tab. A service is started again if it stops, and it comes back when the computer restarts.
www too
People often type www in front of a domain. A bare domain on awx does not answer at www by itself, and the paid plan has one own domain, so the simplest way is to let Cloudflare send www to the bare domain. The www name then needs no record pointing at awx, and it does not use your own domain. We did this for mathhh.com, in three steps in Cloudflare.
- A record for www. In DNS, add a record of type
A, namewww, IPv4 address192.0.2.1, with the proxy on (Proxied, the orange cloud). That address is a placeholder that no visitor reaches: Cloudflare answers the request itself. The proxy has to be on, or the next step never runs. - A redirect rule. In Rules, Redirect Rules, create a rule (Cloudflare also has a template called Redirect from WWW to root). Set the request URL to
https://www.mathhh.com/*, the target URL tohttps://mathhh.com/${1}, the status code to 301, and tick Preserve query string. The*at the end of the request URL catches the rest of the address, and${1}puts it back after the domain. Without the*, Cloudflare refuses the rule with Out of bounds replacement reference. - Always Use HTTPS. In SSL/TLS, Edge Certificates, turn on Always Use HTTPS. The rule only matches addresses that start with
https, so without this,http://www.mathhh.comwaits and then fails. It only changes names with the proxy on, so the bare domain, which is DNS only, still goes straight to awx.
Leave the CNAME on the root and the TXT records as they are. Cloudflare's own certificate already covers www, so the padlock works a minute or two after the record is added. Every way of typing the address now ends at the bare domain, with the rest of the address kept:
| Typed | Ends at |
|---|---|
http://www.mathhh.com | https://mathhh.com/, after two redirects |
https://www.mathhh.com/notes?page=2 | https://mathhh.com/notes?page=2 |
http://mathhh.com | https://mathhh.com/ |
If your domain is with another DNS provider, look for its forwarding or redirect setting for a name, and send www to the bare domain with a 301 (permanent) redirect.
If something looks stuck
| What you see | What to do |
|---|---|
| Not visible yet | Wait a few minutes. Check the name and the value against the wizard, and that you added the record to the right domain. |
| Different value | A record with that name exists but says something else. Edit it to the value in the wizard. |
| The name already has an A or AAAA record | A name with a CNAME cannot have those. Delete them, then add the CNAME. |
| The proxy is on | Set the CNAME to DNS only, so that visitors go straight to awx. |
| Cannot be checked from outside | This shows for a bare domain. Your DNS provider answers with addresses, so the record cannot be seen directly. The wizard goes on to the next check anyway. |
www does not open | A bare domain does not answer at www by itself. Send it to the bare domain, as in www too. |
| Cloudflare says Out of bounds replacement reference | The request URL of the redirect rule needs /* at the end, for ${1} to have something to put back. |
http://www… waits, then fails | Turn on Always Use HTTPS in SSL/TLS, Edge Certificates. |
A name on awanbox.com instead
The same wizard makes a name such as myapp.awanbox.com. Choose the first option in step 1. It has no DNS step, because the name is ours: the wizard checks that the name is free and that you have room for it, and the address works as soon as you press Create name.
Good to know
- You keep your domain. It stays with your registrar. awx only receives visitors for the address you add.
- Remove it any time. Remove the domain on the computer's Own domain tab, and delete the records when you like.
- It is public. Anyone who knows the address can open it. Do not put anything private on it.
Keep reading
- How to build a student portfolio at yourname.awanbox.com
- How to put your own domain on an awx link, a run with a QR code generator
- How to put your bare domain on an awx link, for yourname.com itself
- How to host a WordPress blog on Awanbox
Getting started
Sign in with your Google account, give your name and confirm your email. New accounts are approved by hand, and you start on the Free plan. Build a page, make a link, and see Pricing for what the paid plan includes.
Awi, signing off.