Forums

How could I host the same web app via two urls?

I may want to change my web app's url at some point, and I would like to simultaneously serve the same app from two URLs during a transition period. Is this possible with PythonAnywhere? Could I add a second web app with the new url pointing to the same django files?

Sure! You'd need an account that supports two websites, but then you'd just need to create a new website using "Manual configuration" for the new hostname, and then copy the contents of the WSGI file over from the old site's one to the new one, and set up the other stuff on the "Web" tab to match (eg. static files mappings and virtualenv).

Oh, and if it's a Django app you'd need to make sure that both domains are in the ALLOWED_HOSTS in settings.py too.

OK great - sounds straightforward. Thanks so much!

It should be -- but drop us a line here or over email if you hit any problems when you set it up :-)