Question:
How to make godaddy domain points to ip and port?
Moaayad
2015-11-01 23:05:47 UTC
I want when I configure my domain to go to an ip and port ex: 213.34.56.112:8080

1- I don't want to use forwarding since it just makes a frame and write the ip in it
2- I don't want to use sub-domain just the main domain ex: example.com
Three answers:
efflandt
2015-11-02 18:46:01 UTC
Normally DNS only resolves names to IP addresses, IPs to names, or some other things like MX records (for e-mail). Apparently there is a way to specify a port in DNS, but it is sort of iffy whether it will work for everyone. So it would be best to include the port in the name:port or IP:port when using a non-standard port.



For example someone where I have a Unix shell account was running a minecraft tekkit server at home. Normally I connected to it using name:port since he had a vanilla minecraft server on the default port 25565. He had different name configured in DNS to specify the port for the tekkit server. However, that did not work with my ISP's DNS, it only worked if I manually configured my computer to use Google's DNS I think (8.8.8.8). So there is a high probability that attempting to use DNS to specify a port may be unreliable for many people, since it may not be propagated to DNS servers that are not set up to do that.



http://stackoverflow.com/questions/19015138/how-to-redirect-dns-to-different-ports



It also may depend upon whether you are familiar with and run an authoritative nameserver for your domain and know how to properly configure domain zone files for it. I have done that at home for DNS for local computers on my LAN, but have not tried the port specification thing.
Adrian
2015-11-02 08:40:59 UTC
If you are running your own server, you can go into the Godaddy DNS management tools, and point the domain name to the IP (and port) of your external web server.

I do this for one web site on my server at home, using a GoDaddy Domain name, point it to my web server...

Of course, your web server has to be able to respond to the URL, meaning you have to have your port forwarding all set up first.
Robert J
2015-11-01 23:35:44 UTC
As far as I am aware, you cannot.



You may be able to configure DNS records, but DNS only deals with domain<>address translations and not ports.



The port is part of the URL used to access a site or system, eg.www.website.com:8080

People either have to use that or you need a redirect...



There is no reason you cannot do it yourself with a minimal PHP script on the main (port 80) website; just do a 302 (or 307 or 301) redirect to the domain:8080



That should transparently route anyone visiting the site to the alternate version on 8080.



Note that port 8080 is commonly used for proxies and may not be remotely accessible on any particular shared hosting system.



Example redirect script - just change the 301 & URL to whatever you want:

http://www.phpjunkyard.com/tutorials/php-redirect.php



Redirect codes:

https://en.wikipedia.org/wiki/URL_redirection#HTTP_status_codes_3xx


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...