-
Notifications
You must be signed in to change notification settings - Fork 302
Add cname flattening docs #2745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,7 +46,7 @@ You can add your own domain to your Appwrite site to provide a branded experienc | |
|
|
||
| Apex domains (also known as root domains) are domains without a subdomain prefix, like `example.com` instead of `www.example.com`. Unlike subdomains, apex domains cannot use CNAME records due to DNS protocol limitations. | ||
|
|
||
| To add an apex domain: | ||
| To add an apex domain via NS records: | ||
|
|
||
| 1. Navigate to your site in the Appwrite Console. | ||
| 2. Head to the **Domains** tab and click on **Add domain**. | ||
|
|
@@ -56,14 +56,19 @@ To add an apex domain: | |
| 6. Go to your domain registrar and update the NS records for your domain to point to `ns1.appwrite.zone` and `ns2.appwrite.zone`. | ||
| 7. Return to the Appwrite Console and wait for the verification process to complete. | ||
|
|
||
| {% only_dark %} | ||
|  | ||
| {% /only_dark %} | ||
| {% only_light %} | ||
|  | ||
| {% /only_light %} | ||
|
|
||
| DNS changes can take up to 48 hours to fully propagate across the internet. During this time, your domain might not be accessible or might show inconsistent behavior. | ||
|
|
||
| ### Why Appwrite uses NS records instead of A records | ||
|
|
||
| By [DNS standards (RFC)](https://datatracker.ietf.org/doc/html/rfc1035), apex domains cannot use CNAME records, only A or AAAA records, which require pointing to fixed IP addresses. Using A records would lock Appwrite into specific IP addresses, limiting our ability to optimize routing, scale our infrastructure, or make changes as needed. To avoid this constraint and maintain flexibility, Appwrite offers DNS delegation through NS records so we can manage routing on your behalf. | ||
|
|
||
| Some DNS providers support CNAME-like behavior at the apex through custom setups. If your provider allows it, you can point your apex domain to `appwrite.network` without using Appwrite's nameservers. | ||
|
|
||
| Using Appwrite's DNS servers for your apex domain provides several benefits: | ||
| - Proper SSL certificate management | ||
| - Automatic DNS configuration | ||
|
|
@@ -75,6 +80,34 @@ When you change your domain's NS records, you're delegating DNS management to Ap | |
| Learn more about Appwrite DNS server | ||
| {% /arrow_link %} | ||
|
|
||
| ## Add an apex domain without changing nameservers | ||
|
|
||
| Some DNS providers support CNAME-like behavior at the apex level through a feature called CNAME flattening. This allows you to use a CNAME record for your apex domain without needing to delegate nameservers to Appwrite. | ||
|
|
||
| Depending on your DNS provider, this feature may be provided through **CNAME records**, **ALIAS records**, or **ANAME records**. Check your provider's documentation for the specific DNS record they support. | ||
|
|
||
| To add an apex domain via CNAME flattening: | ||
|
|
||
| 1. Navigate to your site in the Appwrite Console. | ||
| 2. Head to the **Domains** tab and click on **Add domain**. | ||
| 3. Enter your apex domain (e.g., `example.com`). | ||
| 4. Select the appropriate domain rule type (Active deployment, Git branch, or Redirect) and configure its settings. See the [Domain rule types](#domain-rule-types) section for details. | ||
| 5. Copy the **CNAME** record provided by Appwrite (`appwrite.network`). | ||
| 6. Copy the **CAA** record provided by Appwrite (`0 issue "certainly.com"`). | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @adityaoberai worth mentioning that it's certainly for Appwrite Cloud and could be letsencrypt for self-hosted? Worth consulting Matej for more info on this.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We also need to do this in the TLS Certificates section of the docs I'll do that today |
||
| 7. In your DNS provider's settings, create an ALIAS, ANAME, or CNAME record at the apex (depending on what your provider supports). | ||
| 8. Point the record to the Appwrite hostname provided in the console. | ||
| 9. Add the CAA record to your DNS provider's settings, also pointed at the apex. | ||
| 10. Return to the Site settings and wait for verification status. | ||
|
|
||
| {% only_dark %} | ||
|  | ||
| {% /only_dark %} | ||
| {% only_light %} | ||
|  | ||
| {% /only_light %} | ||
|
|
||
| DNS changes can take up to 48 hours to propagate. Once verified, your apex domain will be ready to use with full control over your remaining DNS configuration. | ||
|
|
||
| ## Add a subdomain with CNAME | ||
|
|
||
| Subdomains (like `www.example.com` or `app.example.com`) are set up using CNAME records, which point to Appwrite's hostname. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
certainly.com certificate authority CAA record💡 Result:
To allow Certainly (Fastly’s CA) to issue TLS certificates for your domain, add a DNS CAA record that authorizes the CA identifier:
certainly.com(this is the recognized CAA identifier for Certainly LLC) [1][2]Example records:
Sources: Fastly’s TLS documentation lists
certainly.comas the required CAA value for Certainly [2], and the CCADB “All CAA Identifiers” report listscertainly.comfor Certainly LLC [1].🌐 Web query:
Appwrite custom domain TLS certificate authority💡 Result:
Appwrite’s TLS certificates for custom domains are automatically issued by Let’s Encrypt (the non-profit CA operated by ISRG), using the ACME flow (notably the HTTP-01 challenge for self-hosted setups). [1], [2]
Sources: Appwrite TLS docs [1] and TLS certificates (self-hosting) docs [2].
🌐 Web query:
"certainly.com" CA certificate💡 Result:
Certainly (at certainly.com) is Fastly’s publicly trusted TLS Certification Authority (CA). (fastly.com)
The CA’s root certificates referenced in Mozilla’s public root-inclusion discussion are: (groups.google.com)
77B82CD8644C4305F7ACC5CB156B45675004033D51C60C6202A8E0C33467D3A0(groups.google.com)B4585F22E4AC756A4E8612A1361C5D9D031A93FD84FEBB778FA3068B0FC42DC2(groups.google.com)Fastly also notes Certainly’s intermediate CA certificates have been cross-signed by GoDaddy to improve client compatibility. (fastly.com)
Citations:
Update the CAA record value from
certainly.comtoletsencrypt.org.Appwrite uses Let's Encrypt (ISRG) to issue TLS certificates for custom domains, not Certainly. The CAA record should reference Let's Encrypt as the authorized CA. The correct CAA record should be
0 issue "letsencrypt.org".🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly here is correct.
But worth checking rest of docs (for cloud), to make sure we dont have mistake elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
@Meldiron, acknowledged! I'll verify the consistency of certificate authority references across the cloud documentation.🏁 Script executed:
Length of output: 181
🏁 Script executed:
Length of output: 7177
🏁 Script executed:
Length of output: 1138
@Meldiron, I found an inconsistency that needs clarification:Current documentation states:
src/routes/docs/advanced/security/tls/+page.markdoc): "Appwrite uses Let's Encrypt to auto-generate TLS certificates" - applies to "all" Appwrite products, custom domains, and Function domainscertainly.comRecommendation:
The general TLS documentation page should be updated to clarify which services use which certificate authority. It currently states Let's Encrypt is used for "all" domains, but Sites (particularly with CNAME flattening via Fastly infrastructure) uses Certainly.
Suggested clarification for
src/routes/docs/advanced/security/tls/+page.markdoc:Would you like me to help draft an update for the TLS documentation page to address this?
✏️ Learnings added
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's Encrypt applies to self-hosted deployments and Certainly applies to Appwrite Cloud
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coderabbitai prompt for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adityaoberai, here's the prompt for updating the TLS documentation:Prompt for AI Agents / Manual Update:
This clarification will help users understand which CA to authorize in their CAA records depending on their deployment type.
✏️ Learnings added
🧠 Learnings used