I registered a domain, lets say mysite.com (for example), then, results that somebody else has an A record from anotheraddress.com pointing to the same IP address of mine (in a VPS in linode.com)

What can I do to avoid this???, I mean, I would prefer reject accesses from anotheraddress.com to my site.

I just know only by casualty putting my genuine domain name on this


My DNS server is name.com, and the DNS server pointing to the my public IP is from GoDaddy.

Is possible to register arbitrarily names to the same public IP? Can I use my DNS record with mysite.com to point to (google.com), for example?

6 Answers 6


No, you can't stop people pointing their DNS entries at you any more than you could stop someone from accidentally giving out your telephone number instead of their own.

When you say that you want to "reject access", though, what do you mean? You can configure your webserver to show a "sorry, $domain doesn't live here" message if they go to http://otherdomain.com... But there isn't much you can do to stop, for example, SSH connections (as they care only about IP addresses and not domain names).

To expand a little bit: yes, it would be possible (and, in fact, easy) for you to configure a DNS record you own to point to a server you don't own. It's actually (sort of) common. For example, I own wolever.net, but I point pictures.wolever.net at Amazon's S3 service so when I serve pictures it looks like they are coming from my domain, not some random place on the Internet.


Short answer: yes.

Long answer: yes, and this is how the Domain Name System was designed to work. To understand why, look at any web application that allows its users to use their own "vanity domain". The process goes something like this:

  1. Register a new domain name
  2. Input your domain into the application's control panel
  3. Point your domain to the application's IP address

If I couldn't point my domain name to any IP address, the system wouldn't really work.


You cant really stop someone pointing to your servers but just because they point you server doesn't mean you have to serve them anything.


It's possible that there are numerous (possibly hundreds) of sites hosted on the same IP address (yours included). It's not unusual.

  • 1
    Sometimes, but not in this case. He's using Linode which provide a minimum of one IP per VPS. May 1, 2009 at 7:27

You can point DNS entries to any ip you wish. You can't stop people from pointing to your server. There is a trick you can do with a webserver though. You can set up the default vhost to redirect users to a choosen domain name or display an error or information page.


What you're getting at is the essence of "virtual hosting", and what enables one IP address to serve multiple websites and domain names.

"Old school" webhosting worked on the premise of one website per IP address, no matter what the actual domain name the same website would be served up to the browser.

If you have a name based virtual host, it will only serve up web content for the requested domain name. This basically means you have a vhost set for each site you want to serve off of that IP address, and then depending on your webserver setup a "default" vhost that redirects to a blank page.

IP-based virtual hosts use the IP address of the connection to determine the correct virtual host to serve. Therefore you need to have a separate IP address for each host. With name-based virtual hosting, the server relies on the client to report the hostname as part of the HTTP headers. Using this technique, many different hosts can share the same IP address.

Name-based virtual hosting is usually simpler, since you need only configure your DNS server to map each hostname to the correct IP address and then configure the Apache HTTP Server to recognize the different hostnames. Name-based virtual hosting also eases the demand for scarce IP addresses. Therefore you should use name-based virtual hosting unless there is a specific reason to choose IP-based virtual hosting.

  • True, but quite irrelevant for the original question...
    – bortzmeyer
    May 8, 2009 at 11:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .