-3

we have an godaddy account for dns, and we registered our servers in godaddy dns admin console, right now we have an problem, our case is our registered server ip in godaddy dns can able to register any one of other dns service providers, it might be an issue, someone can easily able to register subdomains to our server ip easily.For eg: if some one have to register subdomain in the name of porn sites and those subdoamins it's pointing to our servers directly it would be an issue for us.How to avoid this case.Please can anyone help for this problem.

  • 2
    I honestly can't tell what situation it is that you're worried about, because your sentences are quite fragmented, but I think you might be worried about someone creating A records pointing other DNS names at your IP. This is impossible to prevent; consider reading up on how DNS works and is managed on a broad scale. – Falcon Momot Dec 01 '13 at 07:29

1 Answers1

3

If I understand your question correctly, it can be rephrased as "How do I prevent people from pointing random A records to our servers' IP addresses".

Well, you cannot. And why would it matter? If I want to point some random porn domain to your webserver, and people visit it, all that happens is that they will see your website, but on a strange URL.

There's absolutely nothing you can do about the DNS part of this, but you can do something about the "seeing strange URL" part: redirecting people to the correct URL if they land on a weird domain name. Something like this in apache speak:

RewriteCond %{HTTP_HOST} !www.example.com
RewriteRule (.*) http://www.example.com$1 [R,L]

So if www.badexample.com points to the same ip as www.example.com, visitors of www.badexample.com will be automatically redirected to www.example.com.

Dennis Kaarsemaker
  • 19,277
  • 2
  • 44
  • 70
  • Thanks for your reply, if we host only one website in our server means we can able to write the above rule in our apache easily and it responds, but we are hosting many website on our server, In this case what i have to do, if we need to do some more modification on above apache rule for this case on multiple domains... – user201078 Dec 02 '13 at 06:48
  • Add a similar block in each vhost definition. – Dennis Kaarsemaker Dec 02 '13 at 07:23
  • Hi, Thanks for your reply, As per your instruction i added each block in each vhost in apache, but sill not worked.i tried to create a domain on some other dns provider and trigger the url it always shows the apache test page, it's not redirecting.... – user201078 Dec 02 '13 at 07:42
  • Then you still have the default vhost config in there as well. Remove it (and make your most wanted domain the default vhost by making its config file come first alphabetically). – Dennis Kaarsemaker Dec 02 '13 at 07:44
  • Thanks for your reply, But still i didn't get the exact point from your sentence...can you please elaborate that... – user201078 Dec 02 '13 at 07:55