Checking Blog Privacy Settings

As a result of last nights post, I dove in and added a check to my Robots Meta plugin that checks whether you’re allowing search engines to spider your site.

If not, it’ll throw an ugly warning on each and every page until you fix it:

The code for it is easy, and as I’d like other plugins to start using it as well, let me give it to you here:

function blog_public_warning() {
  if ( '0' == get_option('blog_public') ) {
    echo "<div id='message' class='error'><p>";
    echo "<strong>Robots Meta Issue: You're blocking access to robots.</strong>";
    echo " You must <a href='options-privacy.php'>go to your Privacy settings</a>";
    echo " and set your blog visible to everyone.";
    echo "</p></div>";
  }
}
add_action('admin_footer', 'blog_public_warning');

That’s easy enough, I think each and every WordPress plugin to do with SEO should do this check, to be honest.

Tags:


Yoast.com runs on the Genesis Framework

Genesis theme frameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides you with the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Read our Genesis review or get Genesis now!

29 Responses

  1. Hameedullah KhanBy Hameedullah Khan on 31 December, 2009

    Nice tip! I agree that every SEO plugin should do this check.

    • DebjitBy Debjit on 3 January, 2010

      Totally agree with you and Joost, this is one basic thing that every SEO plugin should implement for more user awareness. These days everyone is taking to wordpress blogging and they add plugins blindly. SO having such a warning message is always helpful for users!

  2. David WesteirnkBy David Westeirnk on 31 December, 2009

    SEO 1-on-1 I think… And it’s so easy to do… I can’t think of a reason to have a SEO plugin when you don’t want your site crawled by bots in the first place though….

  3. Kenneth DamboBy Kenneth Dambo on 31 December, 2009

    The point is that those who do install an SEO plugin wants to be crawled an indexed for sure and to ensure that this check is crusial due to “removing indexing barriers” being the first step in SEO.

  4. Dennis WhitemanBy Dennis Whiteman on 31 December, 2009

    That’s an important thing. While developing one of my sites, I had the setting in WordPress set so that the dev site wasn’t being crawled. When the launched in June, I couldn’t figure out why our traffic was down so dramatically and my client was trying to blame WordPress. It turned out that I forgot to switch the visibility setting under privacy on and, so where we were at the top of the search rankings, we no longer existed to Google and the others. It took us about a week to recover and a month or so for our traffic levels to get back to normal levels.

    • Joost de ValkBy Joost de Valk on 31 December, 2009

      it happens to everyone :)

  5. NicolasBy Nicolas on 31 December, 2009

    Same as Dennis – I launched a new WordPress site a few weeks ago ; still not indexed, checked everything (robots, meta tages, title)… except index/follow metas… That cannot be that as I knew how WordPress works…
    Thanks for the tip !

  6. MaynemBy Maynem on 31 December, 2009

    nice feature. its highlighting the finer details which i find important. For example on all in one seo pack it can be easy to forget to no index the tag archives.

  7. Roy HuiskesBy Roy Huiskes on 31 December, 2009

    Great! This actually solves occasional problems after an update.

  8. SteveBy Steve on 1 January, 2010

    Thanks for the tip, I assumed if you did not manually block access the site was indexed.

  9. TimBy Tim on 2 January, 2010

    Thanks for the tip. When I create a new site I sometimes change category names and post names etc. as I add the initial content because I often refine my ideas when I start to see the site take shape. I tend to switch off ‘allow search engines’ until I have stopped changing things as they might index a page or a category that no longer exists. Would you say that was good practice?

  10. vinayBy vinay on 2 January, 2010

    Great Article!!!!!!!!! will come back for more

  11. MikeBy Mike on 3 January, 2010

    I can see why you added it, but it would be really cool if there was a (hidden?) option to remove the notice. I use this plugin to keep my blog off the internets, and it does a pretty darn good job. Thank you for that.

    I could remove the code by hand, but I’d have to do this every time you updated the plugin, which is a hassle. Please?

    • MikeBy Mike on 14 January, 2010

      Bump! Did you see my comment, Joost?

      • Eric BBy Eric B on 19 January, 2010

        I think its fault to rely on no-index to keep your page out of search results.. But even so it would be nice to have the option to hide the message.

  12. Nic JamesBy Nic James on 3 January, 2010

    BTW, in the Google Analytics plugin settings, under Advanced settings, the phrase below has a typo:

    Not recommended, as this would schew your statistics.

    Schew should be skew.

    thanks for the plugins man, love your work

    (oh and text appears to overlap the right border of this comment box if you type until the letters wrap. this corrects itself, but certainly is odd behaviour. is this some sort of CSS background issue?)

    nic

  13. TonyBy Tony on 4 January, 2010

    Great tip and I love the warning message. There is nothing worse than having a public blog and making the simple mistake of not allowign it to be indexed. Happy New Year and keep up the good work.

  14. LABy LA on 4 January, 2010

    We need the google sitemap plugin to respect the noindex when generating the sitemaps! Or is there a way to do this; anyone know?

  15. 113TidbitsBy 113Tidbits on 5 January, 2010

    Thanks for the check. I usually “cheese” up the privacy settings but with this, I may not have to worry any more.

  16. arsenalBy arsenal on 6 January, 2010

    That is a nice little addition Yoast. I saw a comment on your Facebook post about webdesigner mag issue, so this should alert people well enough about that.
    I would only change teh wording, because you have all kinds of people who would freak out from words: “You’re blocking access to robots.” :)
    Maybe changing it to “You’re blocking your site from showing up in search engine results.” might be better.

  17. vincentBy vincent on 9 January, 2010

    Great plugin mate, have been using it to manage meta tags on several sites.

  18. Anonymous ProgrammerBy Anonymous Programmer on 9 January, 2010

    I just started using your Robots Meta plugin, and I love it. *This time* I had already remembered to check my privacy settings, but I’ve forgotten in the past (haven’t we all?). Here’s to making life easier!

  19. tweeter auto manBy tweeter auto man on 10 January, 2010

    I must download this plugin – I already use your Analytics which is cool.

    Thank you for these plugins.

  20. Tom - marketing tipsBy Tom - marketing tips on 14 January, 2010

    Cool plugin! I have a WordPress blog by use a normal robots.txt file.Perhaps the plugin would do a better job.

  21. TyroneBy Tyrone on 15 January, 2010

    This is helpful for refining your blog details as well. Thanks for the codes! Having similar situations on having your blog indexed seems unnoticed and this plugin is a good solution.

  22. EmmanuelBy Emmanuel on 18 January, 2010

    Nice Tip.

    Just realized I wasn’t letting search engines spider one of my sites- a wrong robots.txt configuration was the culprit. The Robots Meta Plugin is simply amazing.

    Emmanuel.

    PS: BTW, Have you considered adding the option for users to be able to edit their robots.txt file directly from the Robots Meta Plugin dashboard (like you did with the .htaccess file)- would be a great feature, that is, if it’s possible.

  23. Joshua PattonBy Joshua Patton on 25 January, 2010

    I can see how this could be a big issue. Myself I am just starting to understand SEO, I have taken a few of the recommended changes. I noticed that because I forgot to block search engines that I was indexed part way through development, or rather redevelopment since we already had a site, but it was not based on WP.
    Great ideas by the way on using .htaccess files to redirect from old pages to the new ones in WP so as to not lose incoming links.

  24. sanBy san on 27 January, 2010

    I’ve try this tips, but i am still confuse about this tips because i’m a newbie.

Trackbacks