# DNS settings for www

**URL:** https://meta.discourse.org/t/dns-settings-for-www/325772
**Category:** Support
**Created:** [September 10, 2024, 6:58am UTC](https://meta.discourse.org/t/dns-settings-for-www/325772 "2024-09-10T06:58:33Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![microhit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/microhit/32/447960_2.png) [@microhit](https://meta.discourse.org/u/microhit)
#### Post date: [September 10, 2024, 6:58am UTC](https://meta.discourse.org/t/dns-settings-for-www/325772/1 "2024-09-10T06:58:33Z")

</div>

Forum in yaml is deployed as [meta.sportstyle.com](http://meta.sportstyle.com)

If i load “[meta.sportstyle.com](http://meta.sportstyle.com)” it works fine, but if i load [https://sportstyle.com](https://sportstyle.com) or [www.sportstyle.com](http://www.sportstyle.com) it doesnt work.

How can i redirect it, such that typing [https://sportstyle.com](https://sportstyle.com) or [www.sportstyle.com](http://www.sportstyle.com) in browser lead to [meta.sportstyle.com](http://meta.sportstyle.com) ?

i used wildcard and redirect record, still doesnt work. Do i need another certificate?

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/7/7/b77dcadd1b8a5bb25ceae1589346b56b15f31493.png)

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/e/2/ee297003e0f71e72ade97d6f6d7bc640a352de3e.png)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 10, 2024, 1:42pm UTC](https://meta.discourse.org/t/dns-settings-for-www/325772/2 "2024-09-10T13:42:18Z")

</div>

[Set up Let’s Encrypt with multiple domains / redirects](https://meta.discourse.org/t/set-up-let-s-encrypt-with-multiple-domains-redirects/56685)

---

<div class="post-metadata">

### Author: ![microhit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/microhit/32/447960_2.png) [@microhit](https://meta.discourse.org/u/microhit)
#### Post date: [September 11, 2024, 8:15am UTC](https://meta.discourse.org/t/dns-settings-for-www/325772/3 "2024-09-11T08:15:48Z")

</div>

I had checked this already, I am finding this confusing. What is the final working solution? Is it the top most post or the one in bottom?

I really think a simple explanation in steps will really help. For example- 1) steps to follow for DNS records and steps to follow in Yaml file.

When Forum is deployed on [meta.xxx.com](http://meta.xxx.com), users tend to type [www.xxx.com](http://www.xxx.com) but leave fearing security risk when they see error.

Using the script didnt help, same dns security error

> ```plaintext
> after_ssl:
> # tell letsencrypt what additional certs to get
> - replace:
> filename: "/etc/runit/1.d/letsencrypt"
> from: /--keylength/
> to: "-d https://sportstyle.com --keylength"
> - replace:
> filename: "/etc/runit/1.d/letsencrypt"
> from: /--fullchainpath/
> to: "-d https://sportstyle.com --fullchainpath"
> 
> ```

All i want is a redirect from [www.xxx.com](http://www.xxx.com) and [https://xxx.com](https://xxx.com) to [meta.xxx.com](http://meta.xxx.com)  
Can we not just use redirect in dns settings?

---

<div class="post-metadata">

### Author: ![nwnuyhs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nwnuyhs/32/444904_2.png) [@nwnuyhs](https://meta.discourse.org/u/nwnuyhs)
#### Post date: [September 11, 2024, 10:31am UTC](https://meta.discourse.org/t/dns-settings-for-www/325772/4 "2024-09-11T10:31:33Z")

</div>

You can use Cloudflare 301

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 11, 2024, 10:30pm UTC](https://meta.discourse.org/t/dns-settings-for-www/325772/5 "2024-09-11T22:30:33Z")

</div>

Did you follow [Set up Let’s Encrypt with multiple domains / redirects](https://meta.discourse.org/t/set-up-let-s-encrypt-with-multiple-domains-redirects/56685) ? You should enter the _domain_ where it says “domain2” and not a URL.

> [@microhit](#):
>
> Can we not just use redirect in dns settings?

Not if you want to have a valid cert for both domains. `http://sportstyle.com`

> [@microhit](#):
>
> ```plaintext
> to: "-d https://sportstyle.com --keylength"
> 
> ```

That (and the other one) should be

```plaintext
        to: "-d sportstyle.com --keylength"

```

---

<div class="post-metadata">

### Author: ![microhit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/microhit/32/447960_2.png) [@microhit](https://meta.discourse.org/u/microhit)
#### Post date: [September 13, 2024, 4:13am UTC](https://meta.discourse.org/t/dns-settings-for-www/325772/6 "2024-09-13T04:13:21Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/e/2/f/e2fed3488a44c5012d7333cae6e233b0367c6e05.png)

ok i followed the steps, i still get same error like in the first post for - [www.sportstyle.com](http://www.sportstyle.com) and [https://sportstyle.com](https://sportstyle.com)

btw, domain name is not real, its just an example.

The only thing that works is if i type [http://sportstyle.com](http://sportstyle.com) (without s) and [sportstyle.com](http://sportstyle.com), it redirects to [https://meta.sportstyle.com](https://meta.sportstyle.com)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 13, 2024, 10:11am UTC](https://meta.discourse.org/t/dns-settings-for-www/325772/7 "2024-09-13T10:11:45Z")

</div>

Do not include `https://`

---

<div class="post-metadata">

### Author: ![microhit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/microhit/32/447960_2.png) [@microhit](https://meta.discourse.org/u/microhit)
#### Post date: [September 16, 2024, 8:20am UTC](https://meta.discourse.org/t/dns-settings-for-www/325772/8 "2024-09-16T08:20:04Z")

</div>

sure, i edited it, but still getting same error as post #1

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/9/f/99fcacf27a72bb9153c9fc4e76a6de460d78af4b.png)

is there anything else i need to update?

---

<div class="post-metadata">

### Author: ![microhit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/microhit/32/447960_2.png) [@microhit](https://meta.discourse.org/u/microhit)
#### Post date: [October 14, 2024, 6:52pm UTC](https://meta.discourse.org/t/dns-settings-for-www/325772/9 "2024-10-14T18:52:55Z")

</div>

@pfaffman thanks for help, for various reasons i could not get multi certificate to work.

So for now i just reinstalled the portal as [www.abc.com](http://www.abc.com) instead of [meta.abc.com](http://meta.abc.com)

I dont intend to have a separate homepage anyway for now so its ok for now.
