News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

topicseen at the end of a URL

Started by stylusss, October 28, 2012, 07:21:37 PM

Previous topic - Next topic

stylusss

Could some tell me how I could block google from crawling urls that end with topicseen?
For top-notch server quality and expertise, visit CoreISP.net

Kill Em All

In your robots.txt file, include:

Disallow: *topicseen


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

Oldiesmann

Not sure how Google is even finding those links, as they shouldn't be displayed to guests, but this should take care of it.

Sources/Display.php

Find
// Find the previous or next topic.  Make a fuss if there are no more.

Add before that
if (isset($_REQUEST['topicseen']))
{
$context['robot_no_index'] = true;
}

stylusss

Does Kill Em All's suggestion work as well? I used his for the time being.
For top-notch server quality and expertise, visit CoreISP.net

stylusss

Quote from: Oldiesmann on October 30, 2012, 01:04:42 PM
Not sure how Google is even finding those links, as they shouldn't be displayed to guests, but this should take care of it.

Sources/Display.php

Find
// Find the previous or next topic.  Make a fuss if there are no more.

Add before that
if (isset($_REQUEST['topicseen']))
{
$context['robot_no_index'] = true;
}


I tried your suggestion, Oldiesmann, because I got an error from google, presumably because of Kill em all's suggestion.
For top-notch server quality and expertise, visit CoreISP.net

mrintech

Quote from: stylusss on October 31, 2012, 10:11:52 PM


I tried your suggestion, Oldiesmann, because I got an error from google, presumably because of Kill em all's suggestion.

What error?

stylusss

Quote from: mrintech on November 01, 2012, 02:53:32 AM
Quote from: stylusss on October 31, 2012, 10:11:52 PM


I tried your suggestion, Oldiesmann, because I got an error from google, presumably because of Kill em all's suggestion.

What error?

My adsense said that over 1000 pages couldn't get crawled because of the "topicseen" restriction :-\
For top-notch server quality and expertise, visit CoreISP.net

mrintech

Quote from: stylusss on November 01, 2012, 04:07:30 PM


My adsense said that over 1000 pages couldn't get crawled because of the "topicseen" restriction :-\

Just enter this line in robots.txt

Quote
User-agent: MediaPartners-Google
Allow: /

Above lines of code will not restrict AdSense bot from crawling any part of your forum

:)

stylusss

True, but on the contrary, I don't want adsense crawling:

printpage, *wap*, *wap2*, and *imode*.

So that wouldn't work right?
For top-notch server quality and expertise, visit CoreISP.net

mrintech

Then you need to use something like this:

QuoteUser-agent: MediaPartners-Google
Allow: /
Disallow: /*wap2
Disallow: /*wap
Disallow: /*?action


........

:)

Advertisement: