简体   繁体   中英

Adding a domain to a django webapp running on digital ocean

I have a Django Web App that is currently live on digital ocean with an IP address say wxyz, I have also bought a domain name say example.com, how can i add this to my app so that, when i go to example.com , I get to my website which currently is only accessible through the IP. Any advice is appreciated. I'm new to this

  1. Buy/Register your Domain Name with Domain Name providers.
  2. You need to mention your IP in your DNS Management side at Domain Name service providers.

At Django Side - you just make sure to add your Domain Name into settings.py file, in ALLOWED_HOSTS

And you are done!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM