Adding Port Number in DNS name

Nagaraj Hebbar (IN) 1 Reputation point
2022-03-22T05:32:37.587+00:00

Hi,
I have Created a VM Machine and hosted one server in the same VM so I was trying to access it with DNS name (http://dnsname.com:8000) is there any we we can include port number in DNS ? so that when I hit the URL it should be accessable?

Currently the URL is : http://dnsname.com:8000 I want it to be http://dnsname.com

Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
775 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ravi Kanth Koppala 3,391 Reputation points Microsoft Employee Moderator
    2022-03-22T08:34:14.19+00:00

    @Nagaraj Hebbar (IN) ,
    Thank you for reaching out to the Microsoft Q&A platform. Happy to answer your question.

    If I understand your question correctly, you want to access the site using HTTP://dnsname.com and it should redirect to https://dnsname.com:8080. To achieve it, you can use the IIS URTL rewrite modules. You should install the URL Rewrite and the ARR (Application Request Routing) modules for IIS. Here are two links on how these can work together to create a reverse proxy to do what you want:

    https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing
    https://blogs.iis.net/carlosag/setting-up-a-reverse-proxy-using-iis-url-rewrite-and-arr

    Please share more details if my understanding is not correct. Happy to assist you further.

    ----------

    Please "Accept as Answer" and Upvote if any of the above helped so that, it can help others in the community looking for remediation for similar issues.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.