Setting up a custom domain on PythonAnywhere

If you have a paid account on PythonAnywhere, you can set up web apps on your own domain -- that is, a domain that is not

Configuring the domain at the domain registrar

To use your own domain name with a PythonAnywhere web app there are two steps

  1. Purchase a domain name from a domain name registry.

  2. Create a CNAME record for (say) pointing to This tells the domain name system that when someone asks for your website, they should get it from us. All of your domains should point to the same target,, we'll take care of showing the right web app on the right domain. Note: if you're concerned about your username being exposed to the world in your CNAME record, contact us and we can give you an alternative value for the CNAME that keeps you anonymous.

Domains without a www prefix (naked domains)

One small problem with setting up DNS like this is that it doesn't allow "naked domains" -- that is, you can have your site at or, but not at just Here's some more information about that, and some recommendations.

General Instructions

CNAME records have two parts. The Alias and the Canonical Name. The alias in this case should be www. The address should be

Different DNS providers call them different things. So:

Testing your configuration

Use this CNAME lookup tool. Enter your domain name including the www. It will take a few seconds. In the results, if the Canonical Name is anything other than or it doesn't even show you a result for Canonical Name then you have either not set it up properly. Or you need to wait longer for the configuration changes to take effect.

Specific DNS providers

Associating a PythonAnywhere web app with your domain

If you want to create a new web app associated with the domain, just click the "Add a new web app" button on the Web tab, and specify the domain on the first page.

If you want your domain to show a web app that you've already created, the process is a little more complicated. Let's say that the app you want to show is currently displayed at, and you want it to appear at Once you've done the CNAME setup as described above, here's what you do:

That should do the job.

OwnDomains (last edited 2015-06-05 10:49:11 by giles)