privacynote-site / DEPLOY.md
cloudronin's picture
Prep v1: local-only Privacy, v1 promise, 16 GB (PRs #73, #85)
d9a9dbc verified
|
Raw History Blame Contribute Delete
13.7 kB

Deploying plainword.ai (formerly plainword.health)

The site is a Hugging Face Space with the static SDK: cloudronin/privacynote-site (public, on the PRO account). The Space keeps its original name; only the domain changes. Hugging Face serves the files as they are; there is no build.

1. Push the files

From this folder, with a Hugging Face token that can write (hf auth login once, or HF_TOKEN in the environment):

hf upload cloudronin/privacynote-site . --repo-type space --exclude ".DS_Store" --exclude "screenshots/*" --delete "*"

The screenshots folder is a record of how the site looked at launch. It is not part of the site, so the command leaves it out.

--delete "*" removes any file on the Space that is not in this folder. Without it, an upload only adds and replaces, so pages and images taken off the site stay reachable on the Space. Hugging Face keeps the Space's .gitattributes either way.

That makes the Space's files match this folder. The Space rebuilds in under a minute. Check it at https://cloudronin-privacynote-site.static.hf.space (the address without .static shows a 404 for this kind of Space).

Keep every image and font file under 40 KB. Hugging Face stores bigger binary files on a separate download server, so the browser would have to fetch them from another site, and the site's security rule blocks that. The page still loads, but the file is missing. The fonts are split into two files for this reason.

This is the deploy method in use: a direct push from this folder. There is no GitHub Actions workflow.

2. The domain: www.plainword.ai, with the bare domain forwarded

The site lives at www.plainword.ai. The bare domain (plainword.ai) is forwarded there, because a registrar like GoDaddy cannot point the top of a domain at Hugging Face (that needs a CNAME at the top, which GoDaddy does not allow). The steps below assume plainword.ai is at GoDaddy; at another registrar the records are the same, only the menus differ.

Mail: every page links to vishnu@plainword.ai, so set that address up at your mail provider (for Google Workspace, add plainword.ai as a domain and add its MX records) before you push these pages. Never change or delete existing MX records.

2a. Tell Hugging Face the new domain

  1. Open https://huggingface.co/spaces/cloudronin/privacynote-site/settings.
  2. Find Custom domain. Replace the current domain with www.plainword.ai and save.
  3. It will say it is waiting for DNS. That is expected. Leave the page open.

Check while you are there: if the setting holds only one domain, this switch is what makes the old www address stop serving the site. Section 3 forwards it, so do 2a and section 3 together.

2b. Point www at Hugging Face

  1. Sign in at https://dcc.godaddy.com and open My Products.
  2. Next to plainword.ai, choose DNS.
  3. Add (or edit) the record with Type CNAME and Name www. Set Value to hf.space. Leave TTL at its default. Save.
  4. Do not touch any other record.

2c. Forward the bare domain to www

  1. Still under DNS for plainword.ai, open the Forwarding tab.
  2. Under Domain, choose Add Forwarding.
  3. Forward to: https:// and www.plainword.ai.
  4. Forward type: Permanent (301). Settings: Forward only. Save.

GoDaddy sets the bare domain's address records itself when forwarding is on. That is expected.

3. Forward the old domain, privacynote.health

Both old addresses, bare and www, send visitors to https://www.plainword.ai with a permanent (301) redirect. Do this at the same time as 2a.

3a. The bare domain

  1. In GoDaddy, open DNS for privacynote.health, then the Forwarding tab.
  2. Under Domain, edit the existing forwarding (today it points at www.privacynote.health).
  3. Forward to: https:// and www.plainword.ai.
  4. Forward type: Permanent (301). Settings: Forward only. Save.

3b. The www address

Today www.privacynote.health is a CNAME to hf.space, and the Space serves it.

  1. Under DNS for privacynote.health, delete the record with Type CNAME and Name www. GoDaddy will not forward a subdomain that still has a CNAME.
  2. Open the Forwarding tab. Under Subdomain, choose Add Forwarding.
  3. Subdomain: www. Forward to: https:// and www.plainword.ai.
  4. Forward type: Permanent (301). Settings: Forward only. Save.

3c. Keep the mail

Leave the MX records for privacynote.health exactly as they are, so mail sent to vishnu@privacynote.health keeps arriving.

Limits of GoDaddy forwarding

  • It forwards the domain only, not paths. An old link such as www.privacynote.health/privacy.html will not land on the matching page. Every link on the new site uses www.plainword.ai, so this only affects old links held elsewhere.
  • If https://privacynote.health or https://www.privacynote.health shows a certificate warning instead of redirecting, GoDaddy's forwarding is not covering HTTPS. The fix is to move that domain's DNS to Cloudflare (free) and set the redirects there. Copy every existing record first, the mail (MX) records above all.

3d. Check the old domain

After DNS settles, all four old addresses should answer 301 and end at https://www.plainword.ai/:

for u in http://privacynote.health https://privacynote.health \
         http://www.privacynote.health https://www.privacynote.health; do
  echo "$u -> $(curl -sS -o /dev/null -w '%{http_code} %{redirect_url}' "$u")"
done

3e. Forward the previous domain, plainword.health

From 18 Oct 2026 the site moved from www.plainword.health to www.plainword.ai (Vishnu). Both plainword.health addresses, bare and www, forward to https://www.plainword.ai with a permanent (301) redirect. Do this at the same time as 2a.

  1. The bare domain. In GoDaddy, open DNS for plainword.health, then the Forwarding tab. Edit the existing domain forwarding (it points at www.plainword.health). Forward to: https:// and www.plainword.ai. Forward type: Permanent (301). Settings: Forward only. Save.
  2. The www address. Under DNS for plainword.health, delete the record with Type CNAME and Name www (GoDaddy will not forward a subdomain that still has a CNAME). Then Forwarding → Subdomain → Add Forwarding: subdomain www, forward to https:// and www.plainword.ai, Permanent (301), Forward only. Save.
  3. The older domain. Point privacynote.health's two forwardings (3a, 3b) straight at www.plainword.ai, so old links make one hop, not two.
  4. Keep the mail. Leave the MX records for plainword.health exactly as they are, so mail sent to vishnu@plainword.health keeps arriving. The site now links to vishnu@plainword.ai, so that address must be set up and receiving (section 2) before the push.

Paths are not kept. GoDaddy forwards the domain only (see "Limits of GoDaddy forwarding" above). An old link such as www.plainword.health/privacy.html lands on the front page of www.plainword.ai, not on the matching page. Vishnu chose this over a Cloudflare redirect rule on 18 Oct. If every path must be kept later, move plainword.health's DNS to Cloudflare (free), copy every record first (MX above all), and add one redirect rule: 301 to https://www.plainword.ai with the path kept.

Check after DNS settles: all four answer 301 and end at https://www.plainword.ai/:

for u in http://plainword.health https://plainword.health \
         http://www.plainword.health https://www.plainword.health; do
  echo "$u -> $(curl -sS -o /dev/null -w '%{http_code} %{redirect_url}' "$u")"
done

4. Check that it worked

Allow up to an hour for DNS. Then:

  1. The Space's Custom domain setting shows www.plainword.ai as ready.

  2. https://www.plainword.ai opens the site with a valid certificate (a padlock, no warning).

  3. The bare domain answers 301 and ends at https://www.plainword.ai/:

    for u in http://plainword.ai https://plainword.ai; do
      echo "$u -> $(curl -sS -o /dev/null -w '%{http_code} %{redirect_url}' "$u")"
    done
    

    The old domain has its own check in 3d.

  4. https://www.plainword.ai/psychterms opens the same page as the front page (the PsychTerms funnel, launch spec section 7). A form sent from it carries from=psychterms.

  5. A test submission of the beta form arrives in Vishnu's inbox. Send four, one per Mac answer: each shows its own reply on the page. Apple silicon under 16 GB, Apple silicon on older macOS and Intel get a "not yet" reply on screen, never silence.

If step 2 has no valid certificate after a day, write to Hugging Face support from the Space's settings page; their docs do not describe how certificates are issued.

Hugging Face sends its own canonical header pointing at the Space page on huggingface.co, even on the custom domain. The pages say www.plainword.ai is canonical. Search engines may pick either; only Hugging Face can change that.

5. The held Prep site

The full Plainword Prep site sits in ../privacynote-site-held/, next to this folder: index.html, prep/what-leaves.html and terms.html. The full Prep privacy page is already live in this folder (with the promise sentence and the "what leaves" tables), so the held folder has none. It is outside this folder on purpose, so the deploy command above can never upload it. Until it goes live, this folder is the Mac beta form only. The stylesheet, script, fonts and images here already serve both.

It goes live when Vishnu has read it once and the beta build exists (Mac app step 7: a case with a debrief). Then, from the repo root:

cp -R privacynote-site-held/. privacynote-site/
git rm -r privacynote-site-held

Commit, then deploy as in section 1.

To read it before then, copy both folders into one place and serve it:

mkdir -p /tmp/prep-preview && cp -R privacynote-site/. privacynote-site-held/. /tmp/prep-preview/
cd /tmp/prep-preview && python3 -m http.server 8000

Then open http://localhost:8000.

After it goes live, check that https://www.plainword.ai/prep/what-leaves (no .html) opens the page. The host serves /privacy from privacy.html; the same is expected one folder down but has not been checked.

Not settled yet

  • The "not yet" email. Intel and older-macOS answers get their reply on the page today. Whether Formspree can also send it by email (its autoresponse feature, which may need a paid plan) is not checked. Until then, any reply by email is sent by hand.

6. Moving to plainword.ai

Decided 18 Oct: the site moves to plainword.ai, and plainword.health redirects permanently, every path. The site lives at www.plainword.ai, with the bare domain forwarded, for the same reason as section 2. Sections 2 and 3 describe the plainword.health setup this replaces.

In this order:

  1. Register plainword.ai. Done 18 Oct at GoDaddy (nameservers ns01/ns02.domaincontrol.com).

  2. DNS for plainword.ai, the same steps as 2b and 2c with the new name: in GoDaddy, under DNS for plainword.ai, add Type CNAME, Name www, Value hf.space. Then Forwarding, Domain: forward to https:// and www.plainword.ai, Permanent (301), Forward only.

  3. Mail. The site keeps vishnu@plainword.health until mail to vishnu@plainword.ai is proven: add plainword.ai to Google Workspace, add its MX records, send a test.

  4. Switch the site. Done in the pages: canonical, og and twitter URLs, the og image URL and the footer say www.plainword.ai. The email stays vishnu@plainword.health until step 3 passes. Deploy it. Check: if the Formspree form limits which sites may post to it, add www.plainword.ai there, then send one test from the new address.

  5. Hugging Face. In the Space's settings, set Custom domain to www.plainword.ai. From then on the Space no longer serves www.plainword.health, so do step 6 at the same time.

  6. Redirect plainword.health, every path. GoDaddy forwarding cannot do this: it drops the path (on 18 Oct, http://plainword.health/privacy answered 404). Move the DNS for plainword.health to Cloudflare (free plan). Copy every record first, the mail (MX) records above all. Then add one Redirect Rule:

    • when the hostname is plainword.health or www.plainword.health,
    • redirect to concat("https://www.plainword.ai", http.request.uri.path),
    • status 301, keep the query string.

    Cloudflare answers the redirect itself, so both hostnames need a proxied DNS record (the orange cloud). Check first against Cloudflare's current docs for redirect rules; this step has not been tried.

  7. privacynote.health. Point its forwards (section 3) at https://www.plainword.ai, or add it to the same Cloudflare rule.

  8. Check. Each of these should answer 301 and land on the same path at www.plainword.ai:

    for u in https://plainword.health/privacy https://www.plainword.health/terms \
             http://plainword.health/ https://www.plainword.health/index.html; do
      echo "$u -> $(curl -sS -o /dev/null -w '%{http_code} %{redirect_url}' "$u")"
    done
    

What worked

Fill in once the steps above have been done and checked:

  • www.plainword.ai ready in Space settings:
  • Bare plainword.ai forwards to www over HTTPS:
  • Old domain, bare and www, forwards to www.plainword.ai over HTTPS:
  • Mail records untouched on both domains:
  • vishnu@plainword.ai receives mail:
  • Test form submission arrived: