Page 1 of 2
Spammer Links
Posted: Sun Nov 10, 2019 1:44 pm
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?
Re: Spammer Links
Posted: Sun Nov 10, 2019 7:06 pm
by admin
Hi, how do you create canonical urls?
Re: Spammer Links
Posted: Sun Nov 10, 2019 10:22 pm
by tubeman
Hi,
I use this:
<link rel="canonical" href="http://<?php echo $_SERVER['HTTP_HOST']?><?php echo $_SERVER['REQUEST_URI']?>" />
Re: Spammer Links
Posted: Mon Nov 11, 2019 1:57 pm
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;
Re: Spammer Links
Posted: Sun May 03, 2020 1:30 pm
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,
Re: Spammer Links
Posted: Sun May 03, 2020 5:47 pm
by admin
lets start with the warning
did you try to run update?
Re: Spammer Links
Posted: Mon May 04, 2020 7:59 pm
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?
Re: Spammer Links
Posted: Mon May 04, 2020 8:23 pm
by admin
you output that url in your template so all you have to do is just change that part
Re: Spammer Links
Posted: Mon May 04, 2020 8:49 pm
by tubeman
Sorry, I didn't understand. Which part do I need to change and how?
Re: Spammer Links
Posted: Tue May 05, 2020 5:40 am
by admin
how do you output canonical url in template?