I want to display a list of posts (deals) on homepage (and having a link to original deal on deal provider's site) but I don't want individual posts to be accessible by anyone even search engines. Is this possible? Can making such posts private work?

1 Answer 1


Search engines SHOULD respect the industry standard robots.txt file which you could use to block access to a post type. Such as blocking access to anything under example.com/deals.

You could also go above and beyond and check the $_SERVER['HTTP_USER_AGENT'] for bots. Something like:

$bot_list = array("Teoma", "alexa", "froogle", "Gigabot", "inktomi",
"looksmart", "URL_Spider_SQL", "Firefly", "NationalDirectory",
"Ask Jeeves", "TECNOSEEK", "InfoSeek", "WebFindBot", "girafabot",
"crawler", "www.galaxy.com", "Googlebot", "Scooter", "Slurp",
"msnbot", "appie", "FAST", "WebBug", "Spade", "ZyBorg", "rabaz",
"Baiduspider", "Feedfetcher-Google", "TechnoratiSnoop", "Rankivabot",
"Mediapartners-Google", "Sogou web spider", "WebAlta Crawler"); 

if (in_array($_SERVER['HTTP_USER_AGENT'], $bot_list )) {
    wp_die("You are a robot, I don't like you so go away!";

The botlist above is from this good tutorial on bot detection

Now if you are using private post if the user access them they will get a 404 error. This is also true for bots they will also see a 404. Now If the bot index's the 404 that depends on the bot (most don't though)

However, if you are are just linking deals to other authors why are you even using post at all if the post aren't to be accessed? This may be a better use for links and link categories.

  • Thanks for your answer! Actually, I also want to display some details e.g. image, expiry date, post rating. So, I though posts are better. Please see this I haven't worked much with links. If you think this can be done using links please let me know.
    – a_fan
    Commented Dec 22, 2011 at 7:16
  • A wild idea just occurred to me. What if I keep all these posts as drafts and query drafts only while displaying them on homepage? What do you think?
    – a_fan
    Commented Dec 22, 2011 at 7:19
  • That would work. The BEST solution may be a custom post type. then say if post type hide from world
    – Brooke.
    Commented Dec 22, 2011 at 9:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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