Django Girls Tutorial: Extensions
  • Django Girls Tutorial: Extensions
  • LANGS
  • contributing
  • Django Girls Tutorial: Extensions
    • Summary
    • Homework: Add Wagtail to your website
      • Change Website Homepage to Wagtail Blog Homepage
      • Wagtail Installation and Configuration
      • Adding the Homepage
      • wagtail_integration_adding_posts
    • Homework: Adding security to your website
    • Domain
    • Homework: add more to your website!
    • Homework: create comment model
    • Deploying to PythonAnywhere manually
    • optional_postgresql_installation
  • Tutorial Django Girls : Extensiones
    • Resumen
    • Tarea: Asegura tu sitio
    • Dominio
    • Tarea: Agregar mas a tu sitio web
    • Tarea: Crea un modelo de comentarios
    • optional_postgresql_installation
  • آموزش جنگوگرلز: فعالیت‌های اضافه
    • خلاصه
    • کار در خانه: وبسایت خود را امن‌تر کنید
    • دامین
    • کار در خانه: چیزهای بیشتری به وب‌سایت اضافه کنیم!
    • کار در خانه: ساختن مدل کامنت‌ها
    • انتشار دستی بر روی PythonAnywhere
    • README
  • Django Girls Tutorial: Extensions
    • Summary
    • 宿題: ウェブサイトをセキュアにする
    • ドメイン
    • 宿題: ウェブサイトにもっと機能を追加しよう!
    • 宿題:コメントモデルを作ろう
    • Deploying to PythonAnywhere manually
    • README
  • 장고걸스 튜토리얼 : 심화 (Django Girls Tutorial: Extensions)
    • 목차
    • 숙제: 안전한 웹사이트 만들기
    • 도메인 만들기
    • 숙제: 블로그 개선하기!
    • 숙제 : 댓글 모델 만들기
    • 파이썬애니웨어(PythonAnywhere) 수동 배포하기
    • optional_postgresql_installation
Powered by GitBook
On this page
  • Where to register a domain?
  • How to point your domain at PythonAnywhere
  • Configure the domain via a web app on PythonAnywhere.

Was this helpful?

  1. Django Girls Tutorial: Extensions

Domain

PreviousHomework: Adding security to your websiteNextHomework: add more to your website!

Last updated 4 years ago

Was this helpful?

PythonAnywhere gave you a free domain, but maybe you don't want to have ".pythonanywhere.com" at the end of your blog URL. Maybe you want your blog to just live at "www.infinite-kitten-pictures.org" or "www.3d-printed-steam-engine-parts.com" or "www.antique-buttons.com" or "www.mutant-unicornz.net", or whatever it'll be.

Here we'll talk a bit about where to get a domain, and how to hook it up to your web app on PythonAnywhere. However, you should know that most domains cost money, and PythonAnywere also charges a monthly fee to use your own domain name -- it's not much money in total, but this is probably something you only want to do if you're really committed!

Where to register a domain?

A typical domain costs around $15 a year. There are cheaper and more expensive options, depending on the provider. There are a lot of companies that you can buy a domain from: a simple will give hundreds of options.

Our favourite one is . They advertise as "painless domain management" and it really is painless.

You can also get domains for free. is one place to get one, but you should be aware that free domains sometimes feel a bit cheap -- if your site is going to be for a professional business, you might want to think about paying for a "proper" domain that ends in .com.

How to point your domain at PythonAnywhere

If you went through iwantmyname.com, click Domains in the menu and choose your newly purchased domain. Then locate and click on the manage DNS records link:

Now you need to locate this form:

And fill it in with the following details:

  • Hostname: www

  • Type: CNAME

  • Value: your domain from PythonAnywhere (for example djangogirls.pythonanywhere.com)

  • TTL: 60

Click the Add button and Save changes at the bottom.

Note If you used a different domain provider, the exact UI for finding your DNS / CNAME settings will be different, but your objective is the same: to set up a CNAME that points your new domain at yourusername.pythonanywhere.com.

It can take a few minutes for your domain to start working, so be patient!

Configure the domain via a web app on PythonAnywhere.

You also need to tell PythonAnywhere that you want to use your custom domain.

  • Copy the path to your virtualenv and put it somewhere safe

  • Click through to your wsgi config file, copy the contents, and paste them somewhere safe.

Next, Delete your old web app. Don't worry, this doesn't delete any of your code, it just switches off the domain at yourusername.pythonanywhere.com. Next, create a new web app, and follow these steps:

  • Enter your new domain name

  • Choose "manual configuration"

  • Pick Python 3.4

  • And we're done!

When you get taken back to the web tab.

  • Paste in the virtualenv path you saved earlier

  • Click through to the wsgi configuration file, and paste in the contents from your old config file

Hit reload web app, and you should find your site is live on its new domain!

If you run into any problems, hit the "Send feedback" link on the PythonAnywhere site, and one of their friendly admins will be there to help you in no time.

Go to the and upgrade your account. The cheapest option (a "Hacker" plan) is fine to start with, you can always upgrade it later when you get super-famous and have millions of hits.

Next, go over to the and note down a couple of things:

PythonAnywhere Accounts page
Web tab
google search
I want my name
dot.tk