Skip to content

Moving indiamakers.in from Cloudflare with root and www

This is a case study of one real move. The site is indiamakers.in, which was live on Cloudflare before it moved to LeafCloud. The domain stayed at Cloudflare for its DNS the whole time. Only the records changed.

The site needed both indiamakers.in and www.indiamakers.in. Visitors use either one, so both had to work, and www had to send visitors to the bare domain.

  • One project on LeafCloud, deployed from the site’s build.
  • The domain’s DNS at Cloudflare.
  • A * wildcard record at Cloudflare that already sent other subdomains to other servers. Those subdomains had their own records, so the wildcard did not touch them.

The site is one project, so the domain is a domain for one project. Adding the bare domain also adds www, as a pair:

TerminalTerminal windowbash
leaf domains add indiamakers.in --project <project>

The command printed the records to create. For the pair there were five:

TypeNameWhat it does
TXT_leafcloud-verify.indiamakers.inProves the domain is ours to use. It is shared by the pair.
CNAMEindiamakers.inSends the bare domain to the site.
CNAMEwww.indiamakers.inSends www to the site.
CNAME_acme-challenge.indiamakers.inLets LeafCloud issue the certificate for the bare domain.
CNAME_acme-challenge.www.indiamakers.inThe same for www. Each host needs its own, so there are two.

The bare domain’s CNAME sits at the top of the zone. Cloudflare flattens it, so the bare domain works at Cloudflare without any other change.

The bare domain’s CNAME was added at Cloudflare with the proxy on (the orange cloud).

Visitors then got Cloudflare error 525. Cloudflare connected to LeafCloud over HTTPS before LeafCloud had a certificate for the host, so the handshake failed.

The 525 comes from the proxy, not from the site. See Troubleshooting.

Step 3: Turn off the proxy, and add the challenge records

Section titled “Step 3: Turn off the proxy, and add the challenge records”

Two changes fixed it:

  1. Every LeafCloud record at Cloudflare was switched to DNS only (the grey cloud). That included the bare domain’s CNAME.
  2. Both _acme-challenge CNAMEs were added, one for indiamakers.in and one for www.indiamakers.in. Without them the certificate cannot be issued.

After that, the checks passed, and the domain showed as live. LeafCloud’s certificate covered both hosts.

Check the state at any time with:

TerminalTerminal windowbash
leaf domains show indiamakers.in

Step 4: Make www redirect to the bare domain

Section titled “Step 4: Make www redirect to the bare domain”

The bare domain is the primary address. www was then set to redirect to it, so visitors who type www end up on the bare domain:

TerminalTerminal windowbash
leaf domains redirect www.indiamakers.in

Real steps, 2026-11-02:

  • Every LeafCloud record at Cloudflare set to DNS only (grey cloud), and both _acme-challenge CNAMEs added.
  • Re-check DNS pressed once all the records were correct.
  • Within about a minute, both indiamakers.in and www.indiamakers.in were live, each with a certificate.
  • The www redirect kept the path and the query string.

A redirect is permanent (308). It keeps the path and the query string, so a visit to www.indiamakers.in/about?x=1 goes to https://indiamakers.in/about?x=1.

The * wildcard at Cloudflare still points other subdomains at their servers. The records for indiamakers.in and www are explicit, and an explicit record always wins over a wildcard. So the two addresses went to LeafCloud, and the other subdomains kept going where they went before.

Check this before you add a domain to a zone with a wildcard. The explicit records for the names you move are the only ones that change.

  • Cloudflare’s proxy must be off for LeafCloud records. Turn it on later and the domain can show error 525 or Certificate failed.
  • A bare domain and its www form each need their own _acme-challenge record. Keep them for as long as the domain is used.
  • Make the address that visitors should land on the primary, and redirect the other one.

Related: A domain for one project, Records to add, Cloudflare DNS.