Custom domains

Appwrite custom domains allows you to use your own domain as your Appwrite API endpoint.

Third-party cookies

A recent change made in modern browsers will not allow your web app to use 3rd-party cookies. This change is done to protect your users' privacy from malicious web tracking services.

When accessing Appwrite from a 3rd party domain, like cloud.appwrite.io or example.com, some browsers will treat our secure cookies as 3rd-party cookies and block them, as a fallback Appwrite will store your users' sessions on the browser localStorage.

Using localStorage is very convenient to help you get started quickly with Appwrite, but it is not the best practice for your users' security. The browser localStorage can't protect your users' sessions from being hijacked by a 3rd party script or an XSS vulnerability in your web app.

Appwrite API endpoint

To prevent your browser from blocking your cookies, your Appwrite API endpoint should be set to under same domain of your web app's domain. When accessing Appwrite from the same domain as the one your app uses, Appwrite cookies will no longer be treated as 3rd-party cookies by any browser and will store your users' sessions securely.

For example, if your app runs on my-app.com, you can set the subdomain appwrite.my-app.com to access the Appwrite API. This will allow browsers to respect the Appwrite sessions cookies as they are set on the same domain as your app.

Add a custom domain

  1. Go to the Appwrite Console and navigate to your project.

  2. Click on the Settings tab in the left sidebar.

  3. Select the Custom domains section and click Create domain.

  4. Add your domain, and copy associated CNAME record to your DNS provider. See the Add a CNAME record section.

  5. Verify your domain. DNS changes might take up to 48 hours to propagate worldwide, you may not be able to do this in the same day.

  6. Once you verify your domain, you can generate an SSL certificate.

With these steps, your Appwrite project will accept API requests from your custom domain.

If you encounter any issues during the setup process or have questions, don't hesitate to contact us, and we'll be happy to assist you.

Add a CNAME record

A CNAME record (or a Canonical Name record) is a type of resource record in the Domain Name System (DNS), which maps one domain name (an alias) to another.

Every DNS host has its own way of updating DNS settings, and, unfortunately, their dashboard interfaces usually aren't the most intuitive. We recommend that you read the help documentation of your DNS host, also do not hesitate to contact their support for help with their interface and settings.

Below, you'll find a list of registrars and links to their DNS setting documentation. If your domain provider isn't listed above, please contact us, and we'll include their settings as well.

ProviderDocumentation
IONOSSettings
101domainSettings
123 RegA Record / CNAME Record
AWS Route 53Settings
AlfahostingSettings
BineroSettings
BluehostA Record / CNAME Record / Settings
ClouDNSA Record / CNAME Record
CloudflareSettings
CrazydomainsSettings
DNS Made EasyA Record / CNAME Record
DNSimpleA Record / CNAME Record
DigitalOceanA Record / CNAME Record / Settings
DreamHostA Record / CNAME Record
FreeparkingSettings
GandiA Record / CNAME Record
GodaddyA Record / CNAME Record
Google DomainsA Record / CNAME Record
Host EuropeSettings
HoverSettings
HostingerSettings
InfomaniakSettings
InMotion HostingSettings / CNAME Record
Internet.bsSettings
LeaseWebSettings
LCN.comSettings
LoopiaSettings
Media TempleSettings
NamecheapA Record / CNAME Record
NamesiloA Record / CNAME Record
Network SolutionsA Record / CNAME Record
One.comSettings
OVHSettings
PorkbunA Record / CNAME Record
Register.itSettings
SiteGroundSettings
United DomainsA Record / CNAME Record
VercelSettings
WixSettings
Yahoo Small BusinessA Record / CNAME Record

DNS changes might take up to 48 hours to propagate worldwide. This means that it might take up to two days for your new domain to become accessible using Appwrite. For debugging, you can try using this online tool to check your DNS propagation status.

In addition to the DNS setup, you might also want to update the "Allowed Domains" section in your Appwrite project settings. By default, Appwrite only allows API calls from localhost, appwrite.io, and your project's default custom domains. You can add your custom domain to this list to ensure that API requests from your domain are accepted.