I have a default domain <username>.pythonanywhere.com
, and I've purchased an addition web app to run the script found at https://help.pythonanywhere.com/pages/RedirectWebApp so that all traffic is redirected to www.<customdomain>
.
I've added Force HTTPS certs to both domains. And also tried adding HTTPS to the custom domain but because www.<customdomain> is not like *.pythonanywhere, there is a certificate error.
Error code: SSL_ERROR_BAD_CERT_DOMAIN.
Unable to communicate securely with peer: requested domain name does not match the server’s certificate.
This server could not prove that it is `www.<custom_domain>`; its security certificate is from *.pythonanywhere.com. This may be caused by a misconfiguration or an attacker intercepting your connection.
I expected this issue to not occur since it is a PythonAnywhere solution.