Spammer Links

tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Spammer Links

Post by tubeman »

Hi,
Some spammers are generating links to my sites like this:

http://www.domain.com/?min_duration=600
http://www.domain.com/?min_duration=300-600Free

Google indexing it as duplicate URL's. I even have canonical link but for some reason even the canonical link URL showing this kind of URL:
http://www.domain.com/?min_duration=600 instead of http://www.domain.com/.

How to solve this issue?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Spammer Links

Post by admin »

Hi, how do you create canonical urls?
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Spammer Links

Post by tubeman »

Hi,
I use this:

<link rel="canonical" href="http://<?php echo $_SERVER['HTTP_HOST']?><?php echo $_SERVER['REQUEST_URI']?>" />
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Spammer Links

Post by admin »

Well, you output REQUEST_URI .. what did you expect ..?

you can split it like

list($req, $params) = explode('?', $_SERVER['REQUEST_URI']);

echo $req;
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Spammer Links

Post by tubeman »

Hi,
Now spammer target links like this:

http://www.domain.com/index.php?page=post

And there is Warning in source which google is spidering

<br />
<b>Warning</b>: A non-numeric value encountered in <b>/home/httpd/html/domain.com/public_html/scj/includes/libs/tpl_functions.php</b> on line <b>1827</b><br />

Any idea how to avoid this?

Regards,
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Spammer Links

Post by admin »

lets start with the warning
did you try to run update?
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Spammer Links

Post by tubeman »

Hi,
Thanks, after running update the warning is gone. But now in canonical url for:

http://www.domain.com/index.php?page=post

It shows canonical url :
http://www.domain.com/index.php

How to make it show:
http://www.domain.com

Also when spammers try to attack domain by using links that do not exist (like the above example) how can we send them to 404?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Spammer Links

Post by admin »

you output that url in your template so all you have to do is just change that part
Don't forget to run script update
tubeman
Posts: 534
Joined: Sat Mar 02, 2013 11:33 am

Re: Spammer Links

Post by tubeman »

Sorry, I didn't understand. Which part do I need to change and how?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: Spammer Links

Post by admin »

how do you output canonical url in template?
Don't forget to run script update
Post Reply