Forum Moderators: phranque
Spammer registered .info domain name with same name as our .com domain and is linking to our domain's ip so now we have duplicate sites on one IP address ex: mydomain.com and mydomain.info
I have sent repeated emails to change his dns settings but he wont listen.
Any ideas how can prevent this? Can something be done through mod_rewrite on apache?
Thanks for your help.
Regards.
Deny from baddomain.info
All that is going to to is deny any requests made FROM the baddomain.info server. But they don't have one, so this does nothing in this case.
bird's solution is the correct one. It will rewrite to your domain and avoid a duplicate-content penalty. Not only that, but you pull one over on the bad guy - YOU get the credit for his traffic.
# If requested hostname is NOT blank
RewriteCond %{HTTP_HOST} !^$
# AND requested hostname is NOT my canonical domain name
RewriteCond %{HTTP_HOST} !^www\.example\.com
# THEN redirect to requested page using canonical domain
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
[edit] Formatting [/edit]
[edited by: jdMorgan at 12:46 am (utc) on Nov. 6, 2006]