I have a Django Web App that is currently live on digital ocean with an IP address say w.x.y.z, 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
Asked
Active
Viewed 59 times
-1
-
1THis is not a setting in Django, you will need to edit the DNS record of the domain you have bought. For example a manual for hover: https://help.hover.com/hc/en-us/articles/217282457-How-to-Edit-DNS-records-A-AAAA-CNAME-MX-TXT-SRV- – Willem Van Onsem Aug 30 '18 at 08:06
1 Answers
0
- Buy/Register your Domain Name with Domain Name providers.
- 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!

Sopan
- 644
- 7
- 13
-
-
Yes. So digital ocean serves Django via Ngnix :) check the documentation at - https://uwsgi-docs.readthedocs.io/en/latest/tutorials/Django_and_nginx.html Here also - you need to tell Ngnix what Domain Name you are service via what IP. – Sopan Sep 20 '18 at 10:26
-
Before everything - check Digital ocean, they must have documented procedure to handle this case. You may need to skip modification of `settings.py`. – Sopan Sep 20 '18 at 10:28