How do I connect my flask app running on a droplet to a domain on ?

February 17, 2018 3.1k views
Ubuntu Python Frameworks

I need a step by step guide to connect my flask app running on a droplet to a domain name, which I have bought at

Help me.

1 Answer

Hello there!

First step is to point your domain on to your droplet.

Here is a nice tutorial for that:

Once done that you can just run your Flask app on port 80 and web requests will go right to it.

Best practices state that you should run a webserver that servers up the Flask app for you.
This way, if the flask app dies for some reason, you can have fall back page that will be served up by the webserver.

Here are some instructions to configure Nginx to act as your webserver (this will link to your Flask App).

Hope that helps!

by Josh Barnett
by Kathleen Juell
DNS is the naming system that is used to bind a domain name to a web server. In this guide, we will change the nameservers for a domain that we have registered and point it to a DigitalOcean Droplet.
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!