Forums

Django MismatchCert (Hostname mismatch) using Custom Domain

Hello,

I have a set up a custom domain of www.matchecked.com for my Django project. I think I have the CNAME working: https://www.whatsmydns.net/#CNAME/www.matchecked.com I also have Reloaded my project after changing the name and I don't have an error in the reload.

When I type the website directly into the browser, "www.matchecked.com", it takes me to the PythonAnywhere Coming Soon! page.

When I click directly from the Web App page, I get the "MismatchCert (Hostname mismatch) Blocked by SSL_HOST_MISMATCH" error.

However, in my settings.py, the ALLOWED_HOSTS = ['*']. I know this is not recommended, but I am testing.

Any suggestions / help please?

Feel free to look at the source code / settings in my account.

Thanks

You need a certificate for your site. You can apply one in the Security section of your web app configuration page.

Thanks for the help. I have the certificate working now.

I'm confused as to why when I click on the link to the site from the Web app setup page or access the page via a link, it goes to the correct website, but when I type the address (https://www.matchecked.com) into the browser directly, I end up with the PythonAnywhere Coming Soon! page.

I also tried to set up 301 forwarding from the domain to https://www.matchecked.com on GoDaddy, where I bought the domain, but I'm getting the PythonAnywhere Coming Soon! page again.

Any suggestions please?

I can't reproduce the behavior you've described. If you want to force HTTPS for your site, you can enable it in the Security section of your web app.