# I can't set a CNAME for a root domain with hosting

**URL:** <https://meta.discourse.org/t/i-cant-set-a-cname-for-a-root-domain-with-hosting/27667>\
**Category:** Self-hosting\
**Tags:** hosting\
**Created:** [16 أبريل 2015، 10:06م UTC](https://meta.discourse.org/t/i-cant-set-a-cname-for-a-root-domain-with-hosting/27667 "2015-04-16T22:06:35Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [17 أبريل 2015، 2:39ص UTC](https://meta.discourse.org/t/i-cant-set-a-cname-for-a-root-domain-with-hosting/27667/4 "2015-04-17T02:39:20Z")

</div>

Unfortunately the information @sam gave above is incorrect. I apologize for the delay but there is some difficulty with root domains, and our instructions need to be improved in this specific case.

We really don’t want **hosted customers** mapping to IP addresses as this is fragile and error prone if those IP addresses change in the future, and they definitely will. The specific issue is that you have requested a site at a bare domain, e.g.

> **[Example Domain](http://example.com)**

This is a little bit unusual as **Discourse is designed to work alongside your main website, not be the entire website by itself**. That is why the homepage [discourse.org](http://discourse.org) tells you what Discourse is, rather than dumping you into a lot of discussion.

If you _really_ want Discourse as your homepage – and I advise against this unless you are absolutely sure you will never, ever have any other pages on that domain, forever – then set it up as

> **[Example Domain](http://www.example.com)**

(Because if [example.com](http://example.com) works then [www.example.com](http://www.example.com) also has to work in all cases…)

Where www is the CNAME record pointing to the hosting record. You can then redirect [example.com](http://example.com) to [www.example.com](http://www.example.com) via your DNS settings.

---

_[View the full topic](https://meta.discourse.org/t/i-cant-set-a-cname-for-a-root-domain-with-hosting/27667)._
