0

I am pretty new to Apache2 and DNS so I'm hoping to find help here. I have a Domain i purchased and want to achieve the following: example.com leads to my homepage (that works), discord.example.com and dc.example.com both redirect the user to a https://discord.gg/1234567abc link.

I found the option to do this using the 301 Redirect settings on the control panel of my domain provider. However, it only works when visited using http://. https:// throws an error.

Do i have to create a new VirtualHost with SSL cert for discord.example.com with dc.example.com as alias and manage the redirect in the configuration there?

Thanks!

5
  • 1
    You should contact your (anonymous) domain provider with this question, because offering a 301 redirect, without serving HTTPS, doesn't make much sense these days. Also, when asking questions here, about errors you encounter, it's always wise to tell the reader what the error message is. Commented Feb 7 at 9:47
  • How would there be HTTPS without a webserver running behind it? :) I think the bottom question isn't that missunderstandble, but ok. Commented Feb 7 at 10:40
  • 1
    Related: Do I need a certificate to redirect via CNAME? Commented Feb 7 at 14:18
  • Hi Stephen, thanks for that link! Wouldnt it be possible to create a new VHost within apache2 and have that VHost do the 301? Commented Feb 7 at 14:42
  • Yes, you can create a virtual host in Apache, configure it to redirect, and configure the SSL certificate for it. Commented Feb 8 at 13:23

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.