display domain instead of ip address as url
Solution 1
Lazy way?
Set up a URL Frame
Good way? The way the DNS gods intended?
If you have a dedicated IP, point it with an A record. It's key to note A records can't specify a port. If at all possible, considering migrating your service to port 80? I understand sometimes this isn't possible but it'll make life a hell of a lot easier.
Edit: as for a redirect method, you could run a website on port 80 with like a line or two of HTML in an index.html to redirect to the proper port. Again assumes port 80 is unoccupied.
Solution 2
Previous post to clarify rewrite vs redirect
Michael makes a good point, however, in that if you want your customer to not have to include the port, you either have to do it for them via the redirect method you're using, or move your service to the default HTTP port 80. If you redirect the customer's browser to an IP address, that is what will be populated in the address bar and the Host header.
kwokkaki
Updated on June 04, 2022Comments
-
kwokkaki almost 2 years
my website is www.somedomain.me, rented server from DigitalOcean, domian name is from Namecheap, I redirected www.somedomain.me to http://104.236.xx.xx:6060/main/ , but when I open up www.somedomain.me it display the url as :
**http://104.236.114.32:6060/main/** or **http://104.236.114.32:6060/main/resume.html** or **http://104.236.114.32:6060/main/contact.html**,
how can i let it display as
**http://www.somedomain.me** or **http://www.somedomain.me/resume.html** or **http://www.somedomain.me/contact.html**
Thanks!
-
kwokkaki almost 9 yearsI know hot to set up URL Frame, but it doesn't change but stays as somedomain.me
-
Michael Bailey almost 9 yearsIt'll stay that way for URL Frame unfortunately. The way to legitimately do it is an A record. I'm not entirely sure how to do it cleanly masking/forwarding a non-default port, which is I recommend migrating to 80.