Question

DNS & IIS --resolving a domain and subdomain to the same URL

Asked by: pmosinskis

Hi,

I have two servers:

1. web server running on a DMZ which hosts a web site for www.mycompany.com
2. domain controller and Active Directory-integrated DNS server on an internal network. hosting the domain mycompany.com

I want users who come to my web site to be able to type in either:
http://www.mycompany.com
or
http://mycompany.com
and end up at the same place.

The way I did this before is to run IIS on the domain controller (not a good idea), create a web site using the IP of the domain controller, and use an IIS redirect to push the user to the www.mycompany.com page. Do I create a new host record on the DNS on the domain controller, & point it to the DMZ web server? I'm worried that this approach might interfere with our Active Directory setup in some way, will it?

I know there's gotta be a better way, what is it??? Many thanks!

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-06-18 at 16:42:22ID21031072
Tags

iis

,

subdomain

,

url

,

directory

,

dns

Topic

Microsoft IIS Web Server

Participating Experts
3
Points
0
Comments
13

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Subdomain / DNS / Apache
    Hi, I have a Redhat 6.0 installation in a local network. I'd like to have a virtual web server - a subdomain - like http://test.my_linux_box I think I know how to do this in apache, but where should I define the DNS name? I thought adding this to local /etc/hosts would b...
  2. DNS Subdomaining Win2k
    Hi there, I'm hosting serveral sites on my server including the DNS for them. So far I've not had any problems with 'normal' domains in the format www.example.com where www is the host. I just put the entry into the DNS MMC, set the nameservers and all done. However ...
  3. DNS Subdomains?
    How would I go about forwarding subdomain nameserver traffic to another DNS server? (or, is this possible?) Regular requests should still work: In comes request, "A record for www.domain.com", answered by ns1.domain.com (the authoritative name server for the domain...
  4. DNS pointing a subdomain of ours to another's server
    A user started a pilot site and hosted it with the web developer that created the site. In order to lend credibility to the site, they wanted to call it PILOT.OURDOMAIN.ORG, so I set up an A record on our authoritative DNS for that subdomain to point to their IP address. It...
  5. DNS to DMZ
    I have a a problem getting DNS resolution to and from a web app in my DMZ. I have the access rules set in my firewall to allow DNS, but i can only get to the app by using the internal ip address for the server. I have created host files on my LAN's DNS server, but it still ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: daniel_cPosted on 2004-06-18 at 19:10:20ID: 11349496

You just need to use two host records in the DNS servers (I assume your Domain Registrar use your DNS server):

www.mycompany.com and mycompany.com

which go to the same IP address, and in IIS, set the hostheader for your site: unassigned.

 

by: pmosinskisPosted on 2004-06-21 at 09:29:14ID: 11361518

hi daniel_c,

the problem is that mycompany.com already has a different host record, and that this host is used for the company's Active Directory domain.  For example purposes, let's say the mycompany.com host record contains the following IP's for itself and other DC's in the domain: 10.0.0.1, 10.0.0.2, and 10.0.0.3.

let's also say that www.mycompany.com has a host record which points to IP 255.0.0.1


If I add 255.0.0.1 to the host record for mycompany.com, won't it affect the way the DNS lookups happen on the internal network? Remember, mycompany.com is an AD domain on an internal network; so won't adding a record make an additional DNS "round trip" for those looking for DNS or other AD services on the internal network, and not looking for the web site?

thanks for the clarification!
pete

 

by: gbelseyPosted on 2004-07-09 at 10:36:53ID: 11514169

I have this same problem today.  It looks like it was working, but now is broken.  One thing I came across is this entry for http services in DNS:

_http._tcp.mycompany.com. IN  SRV 0  0  80      webserver1.mycompany.com.

do you already have this in your DNS?  I'm wondering if this is the solution but haven't had a chance to test the theory.  perhaps this solves the problem....which leaves me to wonder how it got removed from my DNS ;o)

Let me know if this is already there, or if it makes a difference.  Thanks

Gord

 

by: pmosinskisPosted on 2004-07-15 at 19:52:03ID: 11565263

Gord, I will look into this issue. Maybe this is the solution.

 

by: pmosinskisPosted on 2004-07-26 at 18:56:04ID: 11643023

Hi Gord,
I think this might be the answer. I will hopefully be able to test & reply in the next week.
Thanks,
Pete

 

by: pmosinskisPosted on 2004-07-28 at 09:11:10ID: 11658119

Hi Gord,

Turns out this does not make any difference in IIS, because few clients actually browse using SRV records. IE, Netscape, and other major web browsers do not support SRV records.

What we may be able to do is just to set up another host record for our domain. Because Active Directory use SRV records to find the location of certain services (ldap, kerberos, etc), it shouldn't pose any problem adding that host record to the domain.

Thanks,
Peter

 

by: gbelseyPosted on 2004-07-30 at 14:54:46ID: 11681719

Hi Peter:

THat didn't work for me either....I thought it was working in the lab, but once I got into the real world, it did't help.  I opened a ticket wih Microsoft....at one point they said you couldn't do it.  They also said you shouldn't name your active directory domain the same as your internet domain.  interesting.......

Microsoft is taking another kick at the can, after I rattled a few cages with them.  If they can find an answer or make a recommendation I'll let you know.  

Have a good one.

Gord

 

by: pmosinskisPosted on 2004-08-02 at 12:35:28ID: 11697198

Great, I'd like to hear the resolution Gord.

Yes, I am aware of the issue that you shouldn't name your Active Directory (AD) domain the same as your Internet domain. This is really due to the fact that AD makes such heavy use of DNS that it would be pretty easy to get situations where you want an internet domain to do one thing but AD wants to do something else.

--Pete

 

by: gbelseyPosted on 2004-08-06 at 08:15:06ID: 11736388

Hi Pete:

Yes, you got it.  Microsoft has promised that an internal DNS expert will call me to discuss further.  In a way it all makes sense, but I have two things I need an explanation for.

1) In my case there are 10 DCs all"eligible" to be resolved for a lookup on mycompany.com.  Only 3 are running services on port 80.  Originally, it ALWAYS resolved to server A, and now it ALWAYS resolves to server B.  If it was simply an issue of the web lookups conflicting with DC entries, I'd expect it to be random....different addresses being returned at different times.  This is not the case, so why is it so rock-solid consistent?  Perhaps in understanding this, we'll find a way to "control" the response to lookups (which would allow us to solve the issue).

2) I need a clear explanation of how the SRV records come into play.  Why isn't the _http record I set up doing what I think it should do?  This may be a misunderstanding on my part, but what's the point of having an _http SRV record??  Hopefully they can fill me in.

I'll try to post any further info I get on the matter.  In the meantime, the response is "yup, that's the way it works".  Here's the official word I received from Microsoft:

The AD domain mycompany.ca and the external website have the same domain name.

So, if an internal user types in mycompany.ca and they are configured to use an internal DNS server (which they should be), the internal DNS server will resolve the record to a DC in the local domain (EAGLE).  If they have a DNS host (A) record, “www” in the zone that will resolve to the external web site, then this will work, but just typing in the domain name alone will always resolve to a DC in the domain.

In the domain planning phase, this can be avoided by using an internal DNS namespace such as corp.mycompany.ca, or mycompany.local.  

 

by: pmosinskisPosted on 2004-08-06 at 10:25:05ID: 11737693

Hi Gord,

With regards to answer #1, I wonder if it has to do with the "sites" in AD. I have heard that Windows tries to localize certain server requests based on the site that the DC's are a part of. This is by design, to ensure that authentication and directory search requests are handled by the "geographically" closest DC to the client (for example, if you had offices in Los Angeles, New York, and Chicago, you'd want people in L.A. authenticating against the L.A. DC, right?) Anyway, I wonder if this applies at all also to DNS queries, because as you know, A/D is highly integrated with Windows DNS.

Re: the SRV records, my understanding is that SRV records were introduced as part of the DNS protocol, but haven't caught on (see: http://www.faqs.org/rfcs/rfc2782.html). Windows uses them to direct or locate certain services like Kerberos and LDAP within a domain, or to help locate domain controllers, but that's about all. Because no major web browsers support lookups by SRV, using the _http SRV would be worthless.

Re: Microsoft's answer, it's unfortunately very ugly. I don't believe anyone should have to run IIS or any other web server on a DC just to re-direct to the web domain. Obviously IIS on a DC is not very secure, because historically IIS has been prone to exploits.

There's just got to be a better solution... :(  MAybe the solution will "simply" be renaming the Active Directory domain...

--pete

 

by: moduloPosted on 2005-02-15 at 02:16:42ID: 13312197

PAQed with points refunded (125)

modulo
Community Support Moderator

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...