Has someone managed to set up multiple top level domains for one site on Laravel Forge, with SSL for each domain. Additionally all domains should redirect to one main domain.
e.g.
main domain: themaindomain.com
other domains should be redirected to https://themaindomain.com
http://example.com -> https://themaindomain.com
http://www.example.com -> https://themaindomain.com
https://example.com -> https://themaindomain.com
https://www.example.com -> https://themaindomain.com
I just set it up like this blog post: https://blog.laravel.com/forge-alias-domains but now when i go to http://www.example.com it just redirects to https://example.com, but it should redirect to https://themaindomain.com/ to avoid duplicate content.
I have added a Let's Encrypt through Laravel Forge where I added all domains in one request:
themaindomain.com,www.themaindomain.com,example.com,www.example.com
That worked as expected, only thing missing is the correct redirect
