We help IT Professionals succeed at work.

Adding a port to the cname record

gd6627
gd6627 asked
on
99 Views
Last Modified: 2019-04-24
How can i create a cname record to a web server that uses a particular port ?

I already have the dns record but i need to create a cname can i add the port number to the FDQN section of the cname?
Comment
Watch Question

CERTIFIED EXPERT
Distinguished Expert 2018

Commented:
Can't be done. That isn't the intent of DNS and the DNS standards offer no means to do this nor would a client understand what it means if you did.
Systems Engineer
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
nociSoftware Engineer
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Browsers use hardcoded ports 80 for http & 443 for https. UNLESS otherwise specified in the URL.
So your users will need to type it.
AlanConsultant
CERTIFIED EXPERT

Commented:
Hi,

You could setup a presite page which contains a link / redirect with the port number hardcoded.

Users would go there first (for such a simple page, you might even use free hosting or at least very cheap), then get sent on to the real site using the non standard port number.

Alan.
nociSoftware Engineer
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
DNS only is about hostnames.. ( and then only for humans, machines don't care about the names, the real communication is using IP addresses.
Shaun VermaakSenior Consultant
CERTIFIED EXPERT
Awarded 2017
Distinguished Expert 2019

Commented:
No need for additional IP addresses.

In bindings of site add a host header. This way you can have multiple sites on same port and IP, similar to shared hosting

iis7-host-headers-4.png
Jeff GloverSr. Systems Administrator
CERTIFIED EXPERT

Commented:
The only way I know of to accomplish this is available via GoDaddy or by making your own website. If you use GoDaddy as DNS, there is a feature called domain/subdomain forwarding. You list the subdomain you want to forward (like www) and list the entire URL you want it to go to. You can include a port on the end of the URL there.
  You can do the same thing by creating a redirect site in IIS. Simply make an empty site there and use IIS redirection to redirect traffic to the correct port.
  This may be available via other DNS hosting providers, not sure. We only use GoDaddy.
nociSoftware Engineer
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
The question was about a port... not a different name.
Jeff GloverSr. Systems Administrator
CERTIFIED EXPERT

Commented:
And we answered him about that. Can't be done in DNS with a cname record. Period. However, as is our way, we suggest ways around it.

Author

Commented:
Thanks everyone I get that you cant assign a port in DNS but I was trying to make the user experience better by not having them type the FQDN literally so I created a friendly CNAME record but I didn't know how to direct the user to the actual port of the app on the server .

I wanted to know how to do that without having to deploy or create a short cut with the port assigned in the url.
I wanted the user to open a browser and type for example  MYApp and it would just go to the UI of the server

Cooli had the explanation I needed

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.