domain redirection with cname or A

Posted on 2011-04-18
Last Modified: 2012-05-11
right now I can access my service only by IP address: XX.XXX.XXX.XXX:8080/NameHere/
I need to specify port and name of my app. Is it possible to cover that with subdomain entry?
I know that with a type A redirection I can get rid of IP address but is it possible to loose port and application name at the end?
Question by:static86
    LVL 4

    Accepted Solution

    Hi there static,

    You'll have to take this on one step at a time -- DNS can't take care of all your requirements. First I would suggest you create an A record so that you can refer to this host by name instead of by IP address. That will convert xx.xx.xx.xx to Next, if this server does not already host something on port 80, then you could listen on port 80 for traffic and using an .htaccess file redirect your users both to the new port (8080) and the subdirectory/application name (/NameHere/).

    That way, when a user hits with a browser, they are automatically redirected to .

    If this makes sense, I can help you write a little .htaccess file to do your redirection.
    LVL 9

    Assisted Solution

    No, port and app name cannot be inserted in the DNS entry as DNS manage the conversion from domains to ip but is not bound to any application.

    You do not have to write because your browser knows the port is 80, not dns.

    You can do what you're asking for using apache and mod_alias or mod_rewrite + mod_jk if your app is on a tomcat

    USER -------- APACHE on port 80 so no need for the url to include the port -------mod_jk------ tomcat
                        Can reconvert to

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    How can you create a game plan that lets you focus on special projects instead of running from cubicle to cubicle every day and feeling like you’ve accomplished nothing? Try these strategies for prioritizing your tasks, offloading what you can, and …
    Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now