2

I have a website of mine (freeofficefinder.com) that is being cloned (see here: thelawyerserviceratings.org) There are actually over 25 websites that are currently cloning our website.

Obviously this is hurting our SEO ranking greatly due to "duplicate content". Is there something that I could add to the Apache config file to ensure that only our website is rendered at the domain freeofficefinder.com. And for all other domains this is blocked?

John Crawford
  • 9,656
  • 9
  • 31
  • 42

1 Answers1

2

As I can see, you web server configured to serve the same virtual host for any requested server name.

Example:

# telnet freeofficefinder.com 80
Trying 78.109.169.208...
Connected to freeofficefinder.com.
Escape character is '^]'.
GET / HTTP/1.1
Host: blablabla.com

HTTP/1.1 200 OK
Date: Wed, 10 Jun 2015 15:54:24 GMT
Server: Apache/2.4.12 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.9
Set-Cookie: device_view=full
Set-Cookie: PHPSESSID=qbe8aar8b58ckr9nvlqbnsdgd2; expires=Wed, 10-Jun-2015 16:54:30 GMT; Max-Age=3600; path=/
Cache-Control: max-age=0, public, s-maxage=604800
X-Content-Digest: en7c017d952f04b31ac9f09a61d0ed6561fd153e3549cdf743cbb277e2db847bab
Content-Length: 17105
Age: 0
Set-Cookie: device_view=full; expires=Thu, 09-Jul-2015 23:00:00 GMT; Max-Age=2531130; path=/; httponly
Vary: Accept-Encoding
Content-Type: text/html; charset=UTF-8

... content ...

This means, anybody can set A-record to your web server IP (78.109.169.208) and your site will work on any domain. The cause is you use an asterisk * as a ServerName Look through your Apache configs, find ServerName and ServerAlias directives, having * as a value, and replace * with your actual host name (freeofficefinder.com).

Then add another one <VirtualHost> section above yours and set a ServerName * for it. This special section will serve requests for all unknown domains like "thelawyerserviceratings.org" etc. You can put there some funny content.

umka
  • 1,655
  • 1
  • 12
  • 18
  • I tried doing as you mentioned see here: http://i.imgur.com/o02WuIO.png However I had to comment out the first part due to an error "Invalid ServerName "*" use ServerAlias to set multiple server names." However when I did this: http://i.imgur.com/i00laS5.png it worked... but sadly freeofficefinder.com also showed the "spam" website. Any idea? – John Crawford Jun 10 '15 at 18:21
  • 1
    Hmm... try to remove `ServerAlias *` from the first virtualhost. It should catch "unknown" domains in any case. – umka Jun 10 '15 at 18:30
  • Thanks a lot. That has worked! Had to use an awesome pic of Cartman for those spammy sites ;-) thelawyerserviceratings.org – John Crawford Jun 10 '15 at 18:48
  • Very nice :) *Thumbs* – umka Jun 10 '15 at 18:56