How to enable let's encrypt for a second domain which just redirects to the first domain

I have successfully setup an https connection for my main webpage, let’s say www.mywebpage.com to connect to my gitlab page.

Now I also would like to have www.mywebpage.de (I already own that one) to redirect to www.mywebpage.com.

What works seamlessly is http://www.mywebpage.dehttps://www.mywebpage.com
But what does not work is https://www.mywebpage.dehttps://www.mywebpage.com

My attempt was to add mywebpage.de as another domain to my gitlab page and enable let’s encrypt for it too, however of course there is this redirect 301 DNS record.

It does not work so far, saying that let’s encrypt failed to setup the domain.
Is there a standard way how to setup such https redirects with letsencrypt?

1 Like

I now understood a bit more about redirects and I think one solution to my problem would be if gitlab pages would allow for domain redirects.

then all pages could be registered as custom domains, and the redirects would be handled by gitlab.

On this documentation it unfortunately says that such redirects are not (yet?) possible