# Www.example.com OK, but example.com NOT

**URL:** https://meta.discourse.org/t/www-example-com-ok-but-example-com-not/127583
**Category:** Self-hosting
**Created:** [September 4, 2019, 8:53am UTC](https://meta.discourse.org/t/www-example-com-ok-but-example-com-not/127583 "2019-09-04T08:53:53Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![John\_Smith3](https://avatars.discourse-cdn.com/v4/letter/j/a9adbd/32.png) [@John\_Smith3](https://meta.discourse.org/u/John_Smith3)
#### Post date: [September 4, 2019, 8:53am UTC](https://meta.discourse.org/t/www-example-com-ok-but-example-com-not/127583/1 "2019-09-04T08:53:53Z")

</div>

Aloha!

When I type [www.mydomain.com](http://www.mydomain.com) into a browser it goes to my Discourse site, however, when I type [mydomain.com](http://mydomain.com) (without www.) it does not.

I followed Discourse’s GoDaddy set up exactly, can anyone explain how to get the [mydomain.com](http://mydomain.com) to work?

Mahalo.

---

<div class="post-metadata">

### Author: ![endukugga](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/endukugga/32/104758_2.png) [@endukugga](https://meta.discourse.org/u/endukugga)
#### Post date: [September 4, 2019, 9:02am UTC](https://meta.discourse.org/t/www-example-com-ok-but-example-com-not/127583/2 "2019-09-04T09:02:50Z")

</div>

This issue has nothing to do with Discourse and it’s about your domain DNS records. From your description it looks like you have an A record for the subdomain `www` pointing at the IP address where you’re hosting Discourse, which is different to the root domain (usually an A record with the name `@`). I’ve never used GoDaddy, so it’s better if you browse through their help section unless somebody else here can help you out.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [September 4, 2019, 11:23am UTC](https://meta.discourse.org/t/www-example-com-ok-but-example-com-not/127583/3 "2019-09-04T11:23:02Z")

</div>

It’s likely more than that. You also need to deal with Let’s Encrypt and your proxy to make this work if you are using https (like you should!)

See:

> [@Set up Let’s Encrypt with multiple domains / redirects](https://meta.discourse.org/t/setting-up-let-s-encrypt-with-multiple-domains/56685):
>
> NOTE: @pfaffman says: This page needs to be cleaned up. There is now a new ENV setting that will let you add more hostnames. In your app.yml under your DISCOURSE\_HOSTNAME line (it can go many places but that one makes sense), add DISCOURSE\_HOSTNAME\_ALIASES: domain.com,other.domain.com and early reports suggest that you’ll get valid certs for those domains and that accessing https://domain.com will properly redirect you to your DISCOURSE\_HOSTNAME without a certificate error. If you do that an…

If I were you, keep it simple and use only one.

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [September 4, 2019, 11:31am UTC](https://meta.discourse.org/t/www-example-com-ok-but-example-com-not/127583/4 "2019-09-04T11:31:20Z")

</div>

Configure the @ record for your domain as an A record to 45.55.96.103

This leverages our (free) service that redirects anything.tld to www.anything.tld.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 4, 2019, 11:40am UTC](https://meta.discourse.org/t/www-example-com-ok-but-example-com-not/127583/5 "2019-10-04T11:40:09Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
