Someone else has a domain that points to my IP - how to stop
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
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..
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
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.
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>
The wonders of technology - always a cooler/better/quicker/shorter way to do something that you never heard of.
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?
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 2: Redirect traffic to pr0n site
Step 3: PROFIT!
(wait, I forgot the ??? step)
Thanks for all of the help - I learned a few things, which never hurts.
@Guspaz:
Or, you know, goatse…
This is an evil way to deal with hotlinking as well.
less likely to cause a legal issue than some of the other suggestions, imo.
# 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;
...
}