I have a web server and I want to link it to a domain. Will making an A Record pointing to the ip of the server link the domain? Also what is the "main port" for requests. By main port I mean the port you go to when you make a request. My site is using Flask and I have to specify the host and port to run it on. So what is the "Main host" and "Main port". I think the main host is 0.0.0.0 and port is 80, 443 or 53.
Asked
Active
Viewed 71 times
-2
-
I am not sure if the term "link to a domain" is correct, but if you want your server to be accessible using a domain name, yes you need a DNS A and/or AAAA record. By default, web servers use ports 80 and 443. 53 is for DNS. 0.0.0.0 is not a port, but an IP address; specifically, this address is a wildcard and means "any IP address. When your web server listens on 0.0.0.0, it receives request that come in via any of the server's IP addresses. However, I have not found the word "main" on the Flask web page that you reference and am not sure if something else is meant by "main port". – berndbausch Apr 22 '21 at 00:54
-
I recommend Miguel Ginsberg's Flask tutorial. In particular regarding the ports question, the [deployment on Linux](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xvii-deployment-on-linux) section should help. – berndbausch Apr 22 '21 at 01:01
1 Answers
0
If understanding your question correctly, yes you will need to point an A record to your web server's IP. Keep in mind that you will need to set up your server to receive incoming requests for the domain and how to do that would depend on your web server of choice.
By default, servers listen to HTTP requests on port 80 and https requests on port 443, not sure if this is what you mean or if this is a flask specific question which I'm not familiar with, but seems like you want your host and port (taking away the main word) that would be host: server IP port: 80

djonamish
- 16