Richard
Richard

Reputation: 4067

Disallow some WordPress posts in robots.txt

Let's say I've published a few WordPress posts with the following URLs:

http://example.com/2011/08/show_this/

http://example.com/2011/08/hide_this/

http://example.com/2009/04/hide_this_too/

If I want to hide all the posts that are named with the prefix "hide_" from search engines but show all others, how can this be achieved with robots.txt?

Upvotes: 0

Views: 611

Answers (1)

Vijay Sharma
Vijay Sharma

Reputation: 373

Adding this to your robots.txt should do it.

Disallow: /*hide*

Upvotes: 2

Related Questions