Forwarding from https:// to https://www

Hi.

I’m new to discourse! I’m hosting discourse on my Ubuntu 24.04 server :slight_smile:

But I need help with domain forwarding…

If I go to this site: https:// mysite - It doesn’t work…

If I go to this site: https://www. mysite it works fine…

So now to my question. Can I forward all traffic from https:// to https://www

I hope someone can help me out, in a noob friendly way :stuck_out_tongue:

Regards

Thomas

Others have suggested https://www.forcewww.com/ in similar questions

3 Likes

Hi.

Thanks :slight_smile:

Are this safe??? Point my server to a random place… ???

Are there other ways to do it?

Where is the nginx configuration located?

Is there a DNS entry for mysite or just for www.mysite?

Does your web server show any log entries for the mysite hits with an indication of why it failed?

Hi @MikeNolan

IPV4 - mysite.dk
IPv4 - www.mysite.dk

IPV6 - mysite.dk
IPv6 - www.mysite.dk

What web engine are you using, it needs to know the equivalence as well.

I assume ping mysite and ping www.mysite both work.

What happens if you try to curl to the mysite URL locally?

Hi

Thanks for the reply…

I’m not sure what web engine I have used.

I just have followed this guide: discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub

Communiteq is a Discourse partner and I also trust the people who recommend it here at Meta

2 Likes

forcewww.com is the most noob-friendly way. I use it, and I have been a full-time consultant on Discourse since 2016.

The harder, and slightly more elegant way, is to add a second domain as described in Set up Let’s Encrypt with multiple domains / redirects.

3 Likes

I can say forcewww.com is reasonably safe. it is built and operated by Communiteq (communiteq is a trusted discourse hosting provider).

2 Likes

Is there some reason why this redirention can’t be done using Nginx?

It already does the redirects. The issue is that it doesn’t have a cert for the other site so if you visit the non www sir you get a certificate error

I see. But… that is just matter of so many times mentioned two -d flags when getting sertificates :thinking:

What the heck I don’t understand now… I have to re-read this topic.

That’s not a simple matter for a novice.

Quite few thing is easy and clear for novices [1]


  1. it is guided almost every 101-helps, though, including Lets Encrypt. But it looks like Discourse is considered different than every other sites, I fell in that rabbit hole ↩︎

1 Like

Hi,

Thanks for all the replies. I did go with this solution: https://www.forcewww.com/

It seems to work fine :slight_smile:

Thanks.

2 Likes

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