Forums

2 Domains - 1 Web App. How do I add the second domain?

Hello!

I have 1 domain (ending in ".at") and now I wish to add a second domain to the app (ending with ".de"). The app will be the same, just the content will be a bit more country specific depending on which domain the user visits.

So far, for the first domain (".at") I have done everything (CNAME record, SSL Certificate) and it is working flawlessly. How do I add the second domain to the app? I have:

  • added the (".de") domain to the ALLOWED_HOSTS in my Django Settings.
  • added a CNAME record to the DNS settings of my (".de") domain.

Unfortunately, when I visit the (".de") domain, I get the standard text " Coming Soon! This is going to be another great website hosted by PythonAnywhere...". Also, how to issue a new SSL certificate for both domains?

Thanks in advance!

You will need to create a web app at the other address, so you may need to upgrade your account.

Hey Glenn,

thanks for the reply. I don't mind to upgrade the account, but where do I go from there / what do I do? I wish to serve both domains, but only from 1 codebase.

How would I approach this?

You can just copy the wsgi file from one web app to the other, then they will load the same code. You will also need to make the static files and other config for the web apps the same.

Got it! Now it is working. Thanks in advance!