Someone else has a domain that points to my IP - how to stop

Lucky me -

Apparently there is another domain name out there which resolves to my domain's IP address. It screws up google since google tries to index that other domain and ends up duplicating content on my own.

What's the best way to just kill all traffic to that domain? It seems stupid that someone can do something like this. Can I tell Apache (or NGINX, since I'm going to move to it soon once I sort out the migration) to ONLY reply to a specific domain name?

Right now I just created a site for that domain and have it pointed at an empty directory with no writes, but that seems like an ugly hack. Plus, it won't solve the problem if someone else does the same thing. :(

17 Replies

Theres not really an easy way to fix that. Afraid there's nothing stoping people doing that..

Best thing to do if you dont want that traffic..

In apache if i remember correctly the first vhost is the default one.. So just make a default vhost of a blank page or whatever you want, and then make yours with all your site names defined in it load second..

does that make sense? im probably doing a bad job of explaining..

You could try doing a whois on the domain and emailing the admin. It might be a mistake.

Boo, that's rubbish. :( Some german website consolidator owns it and like 150 sites. I guess I'll email them, but they have some nasty comments about them on the Internet anyway so I don't have high hopes.

I'll try that vhost idea, thanks. :)

@Cio:

Boo, that's rubbish. :( Some german website consolidator owns it and like 150 sites. I guess I'll email them, but they have some nasty comments about them on the Internet anyway so I don't have high hopes.
You could get lucky - presumably they want the traffic to go to the actual site they control since that's where they can get their hooks into the unsuspecting browser traveler, so having the traffic go to your site isn't helping them any, regardless of their line of business.

I had something similar happen a few years back, but in that case the other site owner had just typo'd an entry in their DNS configuration, and were glad when I called it to their attention.

– David

Why are you serving up ANY content for a html request to a domain you do not own?

Send back a 301, if that doesn't get the owners attention, nothing will.

@vonskippy:

Why are you serving up ANY content for a html request to a domain you do not own?

Send back a 301, if that doesn't get the owners attention, nothing will.
I'm not exactly an expert, and what I did (redirect the domain to a stupid file that does nothing) was all that occurred to me at the time.

For sending back a 301, what did you mean? Send back to where exactly? Thanks. :)

You still need to setup a Virtual Host for that domain (which I agree, is a pisser if the real domain owner won't fix their own DNS setup).

Then in that Virtual Host, setup a .htaccess file or a meta-refresh to return a 301 error (which means the domain has been permanently moved - which means Google will leave you alone).

Or just leave the Virtual Host completely empty, and it will return a 404 error.

I'd setup the 301 page first, THEN contact the real domain owner. If he's a squatter, he'll want to fix that pronto since the 301 will be killing any traffic growth he hopes to get.

@vonskippy:

Then in that Virtual Host, setup a .htaccess file or a meta-refresh to return a 301 error
Huh?

 <virtualhost *:80="">ServerName uglydomain.tld
ServerAlias www.uglydomain.tld

RedirectPermanent / http://realdomain.tld/</virtualhost> 

Neat!

The wonders of technology - always a cooler/better/quicker/shorter way to do something that you never heard of.

Thanks - some good info there. :)

But on the last post what is the realdomain referring to? As far as I can tell, there isn't one for this, it's just some non-maintained domain (that used to have lots of pages, so very odd) that is pointed at my IP. Who should I have the 301 send them off to?

Well, the redirect was made on assumption that you want to make sort-of use of that freebie domain, and make it redirect to your main site (Note that a 301 redirect updates the URL in browser's bar to the target, so an user that typed the uglydomain.tld in there will see it blink and change to realdomain.tld during loading).

Otherwise, you can replace the redirect with regular DocumentRoot line, and either put an index.html explaining the situation there, or leave it empty with Options -DirIndex, so it'll result in 404.

Step 1: Get interest in a pr0n site

Step 2: Redirect traffic to pr0n site

Step 3: PROFIT!

(wait, I forgot the ??? step)

:) I just did a 301 to the holding company's main IP address. If they can't be bothered to fix it, I think it's fair.

Thanks for all of the help - I learned a few things, which never hurts. :D

@Guspaz:

Or, you know, goatse…
This is an evil way to deal with hotlinking as well.

I was thinking sending it to a rickroll would be a nice way to deal with it.

less likely to cause a legal issue than some of the other suggestions, imo.

In nginx you can set a default server block for an ip:port which just drops the connection (or does whatever):

# Close connection for any host not defined
server {
  listen 67.67.67.67:80 default;
  return 444;
}

and then define server blocks for specific hosts:

server {
  listen 67.67.67.67:80;
  server_name example1.com www.site2.com;
  ...
}

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct