• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 689
  • Last Modified:

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.
0
jim34
Asked:
jim34
  • 3
  • 2
  • 2
  • +2
2 Solutions
 
blakogreCommented:
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!
0
 
Glen KnightCommented:
Is your internal domain name the same as your external domain name?
Is the website hosted on your server inside your network?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
oBdACommented:
Remove the empty entry again. From what you wrote, it seems like you have a domain, and your domain name *has* to resolve to a DC, no whens, buts, ifs, ...
The only option you have (and you seem to already have IIS on your DC) is to setup a redirection in the default web page on your DC(s) that will redirect to www.mydomain.org.
0
 
blakogreCommented:
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?
0
 
oBdACommented:
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 ...).
0
 
jim34Author Commented:
The external domain name and the internal domain name are the same. The website is NOT hosted on a server inside of our network.
0
 
Glen KnightCommented:
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.

0
 
Darius GhassemCommented:
That is correct but you can setup a redirection on the server in IIS. Please read over my link.
0
 
blakogreCommented:
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.

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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now