| Author |
Message |
pezzer1
Newbie


Joined: Nov 26, 2007
Posts: 22
|
Posted:
Wed Feb 06, 2008 11:31 am |
|
This might be best asked in the ravennuke forum, but I ask here because I believe my "issue" lies in using shortlinks (rather static html pages.)
My Ravennuke content (with shortlinks enabled) has the "Printer Friendly" link enabled, but google is indexing my printer pages. If one googles a search term, it's possible to go straight to the printer friendly page, which I don't want as they don't have a way to navigate through the site, which is the whole intention.
My first thought was to add "Disallow: /modules/news/print.php" to my robots.txt file, but the fact that's it has already generated a static html page prior to crawling makes me think that won't work.
So, after all that - my question is - is there a way to prevent google (and other legit search engines) from crawling the print friendly pages? |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 926
|
Posted:
Wed Feb 06, 2008 8:34 pm |
|
Actually, this really is not a ShortLinks issue. There are two ways to handle this, one is to change the links to the print page to have a "nofollow" attribute. However, I prefer the following in this case as it should work coming from anywhere:
=== OPEN FILE ===
modules/News/print.php
=== ADD ===
To the PrintPage function code the following meta tag between the <head> tag and the <body> tag:
| Code: |
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
|
or you could use:
| Code: |
<meta name="ROBOTS" content="NONE" />
|
=== DONE ===
This should keep the search engines from indexing these pages as well as from following any links on these pages. |
| |
|
|
 |
pezzer1
Newbie


Joined: Nov 26, 2007
Posts: 22
|
Posted:
Thu Feb 07, 2008 11:18 am |
|
That's exactly what I needed. Never dawned on me to place it within the html output of the page.
Thanks! |
| |
|
|
 |
montego
Site Admin/Owner


Joined: Feb 12, 2005
Posts: 926
|
Posted:
Thu Feb 07, 2008 11:04 pm |
|
Hey, glad that worked! |
_________________ “To err is human, but when the eraser wears out ahead of the pencil, you’re overdoing it.”
-- Josh Jenkins |
|
|
 |
Guardian
Site Admin


Joined: Jul 18, 2005
Posts: 297
|
Posted:
Fri Feb 08, 2008 6:14 pm |
|
|
|
 |
|
|