Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Our site has pages that are print-friendly, which I would like to remove from search engines.

Here's an example: http://rubinarealestate.com/en/property/apartments-charming-neighborhood/?pid=4940&print=1 is the print-version of http://rubinarealestate.com/en/property/apartments-charming-neighborhood/

I assume this can be done with robots.txt and wildcards, as the ?pid=4940&print=1 is always at the end of the URL.

share|improve this question

1 Answer 1

This is as easy as including this disallow rule in your robots.txt file:

User-Agent: *
Disallow: /*print=1

That will only work for bots that actually support wildcards in robots.txt. Google, Bing, and Yahoo all do, but minor search engines may not.

You could also configure your server to include a meta robots noindex directive in the print version of the page:

<META NAME="ROBOTS" CONTENT="NOINDEX">
share|improve this answer
    
Thank you, Stephen! Exactly what I was looking for! –  RubinaRE Dec 12 '13 at 14:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.