Search code examples
djangopythonanywhere

Adding a custom domain in PythonAnywhere does not work


I added my application to pythonanywhere, now I'm trying to add a custom domain but I can not get a positive result.

My change I've added in pythonanywhere looks like this. Under my hidden field is my domain name. enter image description here

According to the documentation, I added a CNAME record (at my domain provider, it looks like this.).

enter image description here

But after entering in the address www.ka ....pl I am not being redirected to my django application in pythonanywhere.

This is my first time when i added my domain, how to fix this error (so that my application will appear after entering the domain), any help will be appreciated.


Solution

  • When setting up your CNAME, you need to end its value with a dot. to be absolute

    CNAME: webapp-*****.pythonanywhere.com.
    

    Otherwise it will be relative to your custom domain and end up like this :

    webapp-*****.pythonanywhere.com.$DOMAIN
    

    See Domain names with dots at the end