DNS for Intranet: Enable Friendly URLs

6,124

Solution 1

You're overcomplicating it, if the goal is to drop the port number and use an alternative short name. Use a single-label name, not a semi-dotted sub-server sub-domain sub-name like "wiki.server"!

Keep in mind that the browser has its own ideas about what's internal and external - rule of thumb, if you throw an address with dots at IE, it'll hit the proxy and try to go externally.

Use your existing internal DNS namespace - the same one that clients use at the moment. If http://servername resolves, use whatever domain that runs from.

Create A-records there for the new server names (to work around potential kerberos issues with IE and CNAME resolution later), and then set the host header for one of those servername:port websites to match the short server name. You don't need to remove the old port binding, you're just adding a new binding for port 80, host header "aliasname".

Aside: Host headers are resolved based on the value the browser client sends to the server in the "Host:" header - which will reflect whatever you typed (i.e. if you typed http://aliasname, it'll be Host: aliasname, not the FQDN of the server). So as long as clients type something that matches that host header string, they'll be routed to the right website.

With this configured, it should basically work, because

  • you're using short names in the browser, which the browser doesn't intuitively want to send to the proxy (or consider part of the Internet zone)
  • you're using the same name in the address bar as you're using for the host header value

Solution 2

You should have set up a domain name within your DNS, for example companyname.co.uk. wiki.servername.co.uk would skip your inside servers and search the co.uk TLD for a servername domain, which obviously doesn't exist.

If you're just wanting internal clients to access it, you can set up a fake domain name internally like company.lan. Then, add it as a search domain for your internal clients in their TCP/IP settings.

Further, on IIS, you need to set up a new website (besides default) to host the subdomain. Name the website wiki.servername.company.lan, or whatever else you desire.

Alternative to all of the above, you can just use unique names for the website without resorting to subdomains. For example, since http://servername already works, you could set up a new website in IIS that will respond to http://anothername. As long as anothername is in your internal DNS pointing to the same IP.

EDIT: I wanted to give an example of what I mean. In my network, we have a domain name of company.org. For internal monitoring, we have set up two websites called itadmin and itwiki on a server called intapps. To access one of these websites, users type either http://itadmin.company.org or just http://itadmin. The internal DNS server points itadmin and itwiki to the same IP, which is the IP for intapps. The A records are recorded under the company.org zone in DNS.

Share:
6,124

Related videos on Youtube

Grant Thomas
Author by

Grant Thomas

Updated on September 17, 2022

Comments

  • Grant Thomas
    Grant Thomas over 1 year

    At work we have an internal server which we use to host things like a wiki and other internal applications - we also use it to demo applications we're currently building within an environment other than our own machines.

    Historically employees have had to use http://ServerName:Port to navigate applications on this server and this is precisely what I'd like to overcome; what I want to enable my colleagues to do is use a friendly, familiar and also somewhat descriptive URL. How might one achieve this?

    I followed an article which walked through the process of setting up DNS on a server but to no avail.

    Is there a clean-cut, efficient way to do this as I'm just wasting time right now?

    • I set up DNS

    • Added Forward Lookup Zone (with defaults so it auto-added (SOA), (NS) and two HOSTS (A) records

    • Added a CNAME record which uses the parent domain

    I can hit http://ServerName which directs me to the default website (which is some Sharepoint thing, I think, stored in the c:\inetpub\wwwroot folder), however on setting up a new website in IIS and adding the header values I want (say, wiki.servername(.co.uk)), I simply can't land on this page as it tried to enter the wild.

    Any thoughts on how I might achieve this or what I might be doing wrong?

  • Hyppy
    Hyppy about 13 years
    Yes, you would. It's much easier if you don't mess with subdomains, since you'd only have to create a new A record in the main zone. Subdomains require you to set up a domain for "servername" in DNS. For example, wiki.servername.company.co.uk would need to be set up under the company.co.uk zone, with an A record for wiki in a subdomain called servername. To create a subdomain in Windows DNS, just right click the zone and select "New Domain". The final structure of your DNS zone will be "companyname.co.uk" Zone -> "Servername" Domain -> Wiki A Record.
  • Hyppy
    Hyppy about 13 years
    That's not too big of a deal if you're short on servers.
  • Grant Thomas
    Grant Thomas about 13 years
    Hm, still can't get this to resolve. Do you possibly know of some resources to aid me in this exercise? I'm no server admin and to be quite honest don't have the time to learn the ins and outs of this whole scenario. Thanks.
  • Grant Thomas
    Grant Thomas about 13 years
    Amazing - thanks! Although, one of the biggest issues was a lack of knowledge of circumstances (I was trying to set DNS up on a server which was ultimately part of our network that already had a DNS server). The solution was to implement what you suggest on the correct server.
  • Ov's Pianist
    Ov's Pianist about 13 years
    Glad it worked for you!