We help IT Professionals succeed at work.

Creating DNS entry for website

Medium Priority
3,140 Views
Last Modified: 2013-11-25
Hi

At the moment, I have an IIS web site running at http://server1.mydomain.com/application1/web

I would like to shorten this so that users only have to type http://app1

How is this possible in DNS?
Comment
Watch Question

Commented:
Are you going to make this available on the web or just on browsers on your LAN?

Author

Commented:
Hi there

Just browsers on our internal network for now.
You can use a DNS alias to resolve APP1 to SERVER1.MYDOMAIN.COM/etc

Commented:
Yes, just make a manual entry in your DNS zone that pointst the IP address of the host to the DNS name. Teh you should be able to type it in a browser to access it.

Author

Commented:
Thanks guys

Ok, let's say the IP of server1 is 192.168.1.10

Are you saying that I need to add an entry that points

192.168.1.10 > app1?

Or an Alias that points

app1 > server1.mydomain.com/application1/web

Or both?

Commented:
@kam_uk:

Justin_W_Chandler's answer is incorrect.

wantabe2's last comment was partially accurate, just incomplete.

What you specifically are asking for cannot be done ONLY with DNS.  DNS is a technology to translate FQDN to IP, IP to FQDN, and identify the FQDN of domain service records.  

What you want is an A or CNAME that directs to server1.mydomain.com.  DNS can be used to create your "app1" alias, and that will get you to the web server "server1.domain.com".  From there, you need to use a webpage redirect on the server1 web server to specifically reference the page "server1.mydomain.com/application1/web".  DNS can get you to the correct web server, the web server itself will have to tell the user what directories/pages to access.  A simple redirect is the answer.

I answered a previous question that is somewhat similar to what you are looking for.  A little more history on that can be found here:

http://www.experts-exchange.com/Networking/Protocols/DNS/Q_23881034.html

Hope this helps, post back if not!! :)
I'm not sure how you could necessarily say that my answer is incorrect, when you say "DNS can be used to create your "app1" alias, and that will get you to the web server "server1.domain.com".", which indicates that I am, in fact, correct. As far as directing to the exact page, of course that's handled by the web server operating on SERVER1.MYDOMAIN.COM. In this case, it could be sent to app1.MYDOMAIN.COM, which would be interpreted by the web sever as a specific page on it's host list. While I'll grant that your answer includes some more information; my answer was definitely not incorrect.

Commented:
Justin-I apologize if you thought my comment was offensive, it wasn't meant to be.  I wanted my response to be crystal clear to the author.  It is clear from your last comment that you understand how it works.  But your first comment indicated that a DNS alias could be used to resolve ".../etc" and that would be very confusing to the author because DNS cannot do that on its own.  Best regards!
brwwigginsIT Manager

Commented:
I thought I would throw a small comment out there on this topic....

The host name "app1" is not a FQDN and therefore would not use DNS resolution unless the client is configured to append the proper DNS suffix. The name resolution process is different for "app1" vs. "app1.company.com"

In most cases, that is not a problem...especially if part of a domain....but something to keep in mind.
BRWWIGGINS good point. MYDOMAIN.COM should be appended by default as long as the client computer being used is also part of that domain.

RVTHOST yes, I see where you're point comes from. In fact, I recognized that fat finger (should have been a comma) but was not allowed to edit the post.

Commented:
give the points to Justin

/TT

Author

Commented:
Ok - am a little confused.. :(

Ok, let's say the IP of server1 is 192.168.1.10

Currently, the application can be accessed via

http://server1.mydomain.com/application1/web

I wish for the application to be accessed at

http://app1.mydomain.com 

What do I need to do?

[sorry]
Commented:
No problem.  Here is the general idea using the information you provided as an example:

- Create a DNS 'A' record for "app1" to resolve to 192.168.1.10
- Accessing http://app1.mydomain.com will now redirect to http://server1.mydomain.com
- It will NOT redirect to http://server1.mydomain.com/application1/web

 What kind of web server is server1.mydomain.com?

- You need to create a default web page or redirect at server1.mydomain.com.  So when a user accesses http://app1.mydomain.com and gets redirected to http://server1.mydomain.com, that default web page or redirect will redirect them once again to http://server1.mydomain.com/application1/web.  

A simple DNS entry cannot do that on its own, so you need to redirect using the web server.

Post back if still confused.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
KAM_UK,

The EASIEST way to accomplish this is by making a basic index.html file and store it in the root folder of the server's html feedfrom. Basically just use a redirect to send it to http://server1.mydomain.com/application1/web by default. (in other words, app1.mydomain.com will only direct to that application) It's not too difficult bro -- if you're confused just start with what you know first and then the rest we can help with. Follow the steps above that RVTHOST posted. The DNS alias is a good start -- because then you can see how the record translation will get you to the server. Then you can focus on the second step, which is the html redirection.

Justin Chandler

Author

Commented:
Thanks all - much appreciated...assigning points equally between Justin and Rtvhost, but thanks to all!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*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.