DNS settings for www

Forum in yaml is deployed as meta.sportstyle.com

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

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

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

image

1 Like

Set up Let’s Encrypt with multiple domains / redirects

3 Likes

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, users tend to type www.xxx.com but leave fearing security risk when they see error.

Using the script didnt help, same dns security error

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 and https://xxx.com to meta.xxx.com
Can we not just use redirect in dns settings?

1 Like

You can use Cloudflare 301

Did you follow Set up Let’s Encrypt with multiple domains / redirects ? You should enter the domain where it says “domain2” and not a URL.

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

That (and the other one) should be

        to: "-d sportstyle.com --keylength"
2 Likes

ok i followed the steps, i still get same error like in the first post for - www.sportstyle.com and 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 (without s) and sportstyle.com, it redirects to https://meta.sportstyle.com

Do not include https://

3 Likes

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

image

is there anything else i need to update?