# Configure your hosted Discourse site to run at the root or apex domain (e.g. example.com)

**URL:** https://meta.discourse.org/t/configure-your-hosted-discourse-site-to-run-at-the-root-or-apex-domain-e-g-example-com/60951
**Category:** Hosted Customers
**Tags:** reference
**Created:** [April 13, 2017, 9:08pm UTC](https://meta.discourse.org/t/configure-your-hosted-discourse-site-to-run-at-the-root-or-apex-domain-e-g-example-com/60951 "2017-04-13T21:08:45Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Discourse](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/discourse/32/148734_2.png) [@Discourse](https://meta.discourse.org/u/Discourse)
#### Post date: [April 13, 2017, 9:08pm UTC](https://meta.discourse.org/t/configure-your-hosted-discourse-site-to-run-at-the-root-or-apex-domain-e-g-example-com/60951/1 "2017-04-13T21:08:45Z")

</div>

> 🔖 This guide explains how to configure a hosted Discourse site to run at the root or apex domain (for example, `example.com` instead of `forum.example.com`). The general process for changing your site’s domain name is covered in the guide for [configuring your domain name for hosted Discourse](https://meta.discourse.org/t/configure-your-domain-name-for-hosted-discourse/21827).
> 
> 🙋 Required user level: Administrator

Most hosted Discourse sites run on a subdomain, such as `forum.example.com`, `talk.example.com`, or `www.example.com`. This is the recommended setup, and in almost all cases it works without issue.

Running your site at the root or apex domain (for example, `example.com`) is possible, but it’s more difficult in a hosted scenario, because of the way DNS works for root domains. This option is available on the Pro, Business, and Enterprise plans. On the Free plan, custom domains aren’t available, and your site stays on its `discourse.group` address.

Two things are required to run your site at a root or apex domain:

1. Your DNS provider must support one of the record types listed below (a regular CNAME record is not enough at the root).
2. The final configuration is completed by the Discourse team, because the **Change Domain Name** button in your admin dashboard checks for a CNAME record and can’t process an apex or root domain.

## Configure your DNS provider

1. Check that your DNS provider supports a record type for the root domain. If your provider isn’t listed below, you must switch to one of these providers first.
2. Create the record described for your provider, following the link in the table for details.
3. Contact the Discourse team at `team@discourse.org` to complete the root domain name change, once your DNS record is in place.

### DNS providers that support root or apex domains

| Provider | Type |
| --- | --- |
| AWS Route53 (AWS only\[1\]) | A & AAAA ALIAS records; click for example → ![AWS Route 53 console showing two ALIAS records for A and AAAA](https://global.discourse-cdn.com/meta/original/4X/a/6/4/a6458ddf68d55cf916bd9d2658c64ef333782072.png) |
| Cloudflare | [CNAME flattening](https://developers.cloudflare.com/dns/cname-flattening/). Turn off the Cloudflare proxy (the cloud icon must be gray) so it doesn’t interfere with the site |
| DNSimple | [ALIAS](https://blog.dnsimple.com/2011/11/introducing-alias-record/) |
| DNS Made Easy | [ANAME](https://www.dnsmadeeasy.com/services/anamerecords/) |
| DreamHost | [ALIAS](https://help.dreamhost.com/hc/en-us/articles/360035516812-Adding-custom-DNS-records#ALIAS_record) |
| easyDNS | [ANAME](https://kb.easydns.com/knowledge/aname-records/) |
| Gandi | [ALIAS](https://docs.gandi.net/en/domain_names/faq/record_types/alias_record.html) |
| Hurricane Electric | [ALIAS](https://dns.he.net/) |
| [Name.com](http://Name.com) | [ANAME](https://www.name.com/support/articles/115010493967-Adding-an-ANAME-Alias-record) |
| Namecheap | [ALIAS](https://www.namecheap.com/support/knowledgebase/article.aspx/10128/2237/how-to-create-an-alias-record) |
| PointDNS | ALIAS |
| Webcentral (formerly Netregistry) | [Cloaked redirection (IPv4 only)](https://support.webcentral.com.au/docs/url-redirection) |

> ❗ If your DNS provider is not listed above, switch to one that supports a root or apex record type before continuing. A regular CNAME record won’t work at the root domain.

> ℹ If you test a DNS provider that isn’t listed here and it works for your site, reply to this topic with the provider’s name and a link that explains how to set it up, so the list can be updated.

* * *

1. this only works if you are self-hosted in AWS or on our AWS Enterprise Hosting 

> Last edited by @dax 2026-09-17T19:26:49Z
> 
> Last checked by @MarkDoerr 2026-02-11T01:10:30Z
> 
> > **Check document**
> >
> > Perform check on document:

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [January 17, 2025, 8:38pm UTC](https://meta.discourse.org/t/configure-your-hosted-discourse-site-to-run-at-the-root-or-apex-domain-e-g-example-com/60951/12 "2025-01-17T20:38:21Z")

</div>

A post was split to a new topic: [Required DNS Settings](https://meta.discourse.org/t/required-dns-settings/347741)

---

<div class="post-metadata">

### Author: ![rey.riel](https://avatars.discourse-cdn.com/v4/letter/r/45deac/32.png) [@rey.riel](https://meta.discourse.org/u/rey.riel)
#### Post date: [March 18, 2025, 6:09pm UTC](https://meta.discourse.org/t/configure-your-hosted-discourse-site-to-run-at-the-root-or-apex-domain-e-g-example-com/60951/13 "2025-03-18T18:09:08Z")

</div>

So it took a minute to figure out, but I managed to get my apex domain to work with Azure, where we host our DNS.

In order to use Azure you need to leverage Azure Front Door. These instructions are for Azure Front Door Standard/Premium, not Azure Front Door (classic).

1. Navigate to Azure Front Door and click **+ Create**
2. Choose **Azure Front Door** and **Custom create** , and click **Continue to create a Front Door**.
3. Choose your Subscription, Resource Group, Name and Tier (Standard worked for me), then click **Next: Secrets**.
4. If you’re using your own SSL cert, Add it here. Once added (or if you’re letting Azure create your cert), click **Next: Endpoint**.
5. Click **Add an endpoint** and choose a name, then click **Add**.
6. Under the new “Routes” section, click **Add a route**. Give it a name.
7. For “Origin group” click **Add a new origin group**. Give it a name.
8. Click **+ Add an origin**. Give it a name. For “Origin type” choose **Custom**. For “Host name” enter your **_site_.hosted-by-discourse.com** domain. Make sure “Origin host header” is blank. Click **Add**.
9. Click **Add** in the “Add an origin group” dialog.
10. Click **Add** in the “Add a route” dialog.
11. Click **Review + create**. Click **Create**.
12. Wait for the AFD to deploy. Once it’s deployed click **Go to resource**.
13. On the left side menu choose **Domains**. Click **Add a domain**.
14. For “DNS zone” choose the zone your domain is in. Under “Custom domain” pick your domain in the **APEX** section. Click **Add**.
15. When your domain appears in the list, click the **…** on the right. Choose **Associate**.
16. Select the endpoint and route you created earlier. Click **Associate**.

**If you’re using an AFD Managed Certificate**

1. If the “Validation state” of your domain is **Pending** , click that link. Choose **Minutes** for the “TTL Unit” (for quick validation), then click the **Add** button under “DNS record status”.
2. BE PATIENT. This is where I spent too much time pulling out my hair, but you need to wait. Eventually your “Validation state” should change to **Approved**.
3. You may have to Regenerate and update the TXT DNS Record. You can do this by clicking the **Regenerate** button. You’ll need to click the **Update** button under “DNS record status” once it appears.

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [March 18, 2025, 6:16pm UTC](https://meta.discourse.org/t/configure-your-hosted-discourse-site-to-run-at-the-root-or-apex-domain-e-g-example-com/60951/14 "2025-03-18T18:16:01Z")

</div>

> [@rey.riel](#):
>
> In order to use Azure you need to leverage Azure Front Door. These instructions are for Azure Front Door Standard/Premium, not Azure Front Door (classic).

FYI for anyone following this: This setup isn’t flattening DNS, it’s configuring a load balancer in Azure to proxy the origin.

This is not officially supported as is since it’ll have side effects (all visitors will come from an Azure IP, not their actual IP)
