Link to home
Start Free TrialLog in
Avatar of jim34
jim34Flag for United States of America

asked on

how to add a record to a local dns server pointing to an offsite web IP address

I've got a network running a Windows Server 2003 domain. On the DC I've got DNS turned on. I've added a Host A record pointing to the IP address of our website (which is hosted offsite) using "www" in the name field and pointing to the IP address of our website (which is hosted offsite). When someone types "www.mydomain.org" it works for internal machines and it loads the website. When someone types in "mydomain.org" without using the "www." as part of the actual address in the web browser I get a page that the website is under construction. When I tried to a cname record for "mydomain.org" it wouldn't let me. When I tried to add a host A record for "mydomain.org" by leaving the name field at the top empty and pointing to the offsite IP address, it let me create it, but didn't work when I typed http://mydomain.org.

From outside our internal network you can get to our website using "http://www.mydomain.org" and "http://mydomain.org" because I've set up a custom A record at the web hosting company without anything in front of the domain name: ex, "mydomain.org" and it points to the IP address of the website. No ".", no "www", or anything.

Basically, I need to know how to set my local DNS server up so I can automatically go to "http://www.mydomain.org" when someone types in "http://mydomain.org", instead of getting an "Under Construction" page.
Avatar of blakogre
blakogre
Flag of United States of America image

From scratch:
Add a new zone, named after the domain name you're resolving records for.
(I did 'mydnstest.com" on my test server)
Add a host record (A).  Put in the IP.  Leave the name entry blank.  
Add an alias (cname) and browse to the A record you made.  Name it WWW

That should do it!
Is your internal domain name the same as your external domain name?
Is the website hosted on your server inside your network?
ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Additional info:
If you follow the info above -- it should *resolve* correctly.  That's the 1st step.

Use ping -- not your browser, to verify that.

Something seems off if it's working both ways on the outside, but not on the inside -- especially if you're ping, per above, is resolving as you expect.  Can you confirm?
Avatar of oBdA
oBdA

blakogre,
jim34 already tried your suggestion: "When I tried to add a host A record for "mydomain.org" by leaving the name field at the top empty and pointing to the offsite IP address, it let me create it, but didn't work when I typed http://mydomain.org."
In an AD domain, this won't work without clearing the DNS cache first, because the DCs already have the "Same as parent" entries and the client has that address in its DNS cache. After the TTL expires, mydomain.org will be resolved to the external address roughly each (number of DCs + 1) queries, messing up AD resolutions (imagine, for example, a machine trying to access \\mydomain.org\sysvol on the external server ...).
Avatar of jim34

ASKER

The external domain name and the internal domain name are the same. The website is NOT hosted on a server inside of our network.
OK then this is where you have problems because as far as your domain (internal) is concerned is it is called mydomain.org so any request for this will end up with your Domain Controller.

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
dariusq is right.

As I mentioned earlier: do the ping test.  You'll see when you ping www, it works.

However, when you ping just your domain name, it's going to go to your DC.

Your DC, if you go to http://dc-name -- will likely show you that same under construction page -- b/c you're going to the same place.  

If you change that page to a redirect, as dariusq mentions, that will resolve the issue.

Create an index.html page, containing:
---start----
<html>
<head>
<meta http-equiv="refresh" content="2;url=http://www.yourdomain.com/" />
<title>Page has moved</title>
</head>
<body>
whatever you want to write
</body>
</html>
---end---

Put it in \inetpub\wwwroot.

Modify your IIS site default documents, to serve up index.html first.  (Right click website, go to Properties, and then the documents tab.  Make sure index.html is first)

Then it should work.

Avatar of jim34

ASKER

I just added a redirect to the IIS site on my DC and all done. Thank you for the help.