Force DNS to resolve locally

Posted on 2009-07-01
Last Modified: 2012-05-07

I have bind9 running on my vyatta router and want to resolve a record like to an IP address on my local network.  The problem seems to be that it appends my domain name to the end of what I added to the A record.  I have also tried adding a period after the name, but that didn't seem to help.

My domain is

I would like to resolve to my IIS7 server so I though my A record should look like this:     IN      A                  ;

But when I hit this is my browser on my network, it loads up WordPress' site.  Am I missing something?

Thanks!     IN      A                  ;

Open in new window

Question by:isz-expert
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2

Expert Comment

ID: 24759882

have you flushed then dns cache on the server?

try ipconfig /flushdns on the server iis is hosted on


Author Comment

ID: 24760336
Nah, that didn't work... it successfully flushed the DNS but calling nslookup still reveals their servers.

I could have sworn that you should be able to put a period at the end and it will resolve the whole name.

Basically, I am trying to accomplish the same thing you would do if you modified the hosts file in Windows, but have it apply to my whole local network.
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
C:\Users\Administrator>ipconfig /flushdns
Windows IP Configuration
Successfully flushed the DNS Resolver Cache.
Non-authoritative answer:

Pinging [] with 32 bytes of data:
Reply from bytes=32 time=49ms TTL=49
Reply from bytes=32 time=45ms TTL=49
Ping statistics for
    Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 45ms, Maximum = 49ms, Average = 47ms

Open in new window


Author Comment

ID: 24760356
sorry, the above code should have been not, either way, it didn't work.  If I take out the period I get this result, which is not correct as it is appending my domain to the end, which I would prefer not to have

Open in new window

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

LVL 71

Expert Comment

by:Chris Dent
ID: 24761200

Heh you have compound wildcard issues :) has a wildcard for * so unless you have a DNS Zone on your router for or you'll get that answer first. Do you have a zone for either of those? Or where did you add the A record.

To get to the problem with you must have a wildcard for That's less of a problem because while NsLookup appends "" the DNS Client is less likely to (depending on service pack level). Do you see the same issue with Ping for that one?


Author Comment

ID: 24762575
Ah... so I need to add another zone?  I'll give that a try tonight and see how that goes.

LVL 71

Accepted Solution

Chris Dent earned 500 total points
ID: 24762581

Yeah, that should work :)


Author Comment

ID: 24769660
After giving it some more thought, I decided to abandon this approach mainly because it would create more effort as projects increase.  It works well for me in development, but is not necessary when it would be easier to just add A records using a project recognizable sub-domain.  So my convention will use something like, or something similar.  

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your business is like most, chances are you still need to maintain a fax infrastructure for your staff. It’s hard to believe that a communication technology that was thriving in the mid-80s could still be an essential part of your team’s modern I…
Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question