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.





by Hameedullah Khan on 31 December, 2009 at 11:15
Nice tip! I agree that every SEO plugin should do this check.
by Debjit on 3 January, 2010 at 08:36
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!
by David Westeirnk on 31 December, 2009 at 11:24
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....
by Kenneth Dambo on 31 December, 2009 at 11:43
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.
by Dennis Whiteman on 31 December, 2009 at 13:06
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.
by Joost de Valk on 31 December, 2009 at 13:23
it happens to everyone :)
by Nicolas on 31 December, 2009 at 13:22
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 !
by Maynem on 31 December, 2009 at 16:13
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.
by Roy Huiskes on 31 December, 2009 at 16:53
Great! This actually solves occasional problems after an update.
by Steve on 1 January, 2010 at 00:01
Thanks for the tip, I assumed if you did not manually block access the site was indexed.
by Tim on 2 January, 2010 at 10:37
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?
by vinay on 2 January, 2010 at 12:08
Great Article!!!!!!!!! will come back for more
by Mike on 3 January, 2010 at 03:46
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?
by Mike on 14 January, 2010 at 13:20
Bump! Did you see my comment, Joost?
by Eric B on 19 January, 2010 at 19:29
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.
by Nic James on 3 January, 2010 at 08:28
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
by Tony on 4 January, 2010 at 10:54
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.
by LA on 4 January, 2010 at 19:14
We need the google sitemap plugin to respect the noindex when generating the sitemaps! Or is there a way to do this; anyone know?
by 113Tidbits on 5 January, 2010 at 07:10
Thanks for the check. I usually "cheese" up the privacy settings but with this, I may not have to worry any more.
by arsenal on 6 January, 2010 at 11:59
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.
by vincent on 9 January, 2010 at 15:24
Great plugin mate, have been using it to manage meta tags on several sites.
by Anonymous Programmer on 9 January, 2010 at 22:51
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!
by tweeter auto man on 10 January, 2010 at 17:41
I must download this plugin - I already use your Analytics which is cool.
Thank you for these plugins.
by Tom - marketing tips on 14 January, 2010 at 11:05
Cool plugin! I have a WordPress blog by use a normal robots.txt file.Perhaps the plugin would do a better job.
by Tyrone on 15 January, 2010 at 12:47
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.
by Emmanuel on 18 January, 2010 at 11:45
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.
by Joshua Patton on 25 January, 2010 at 02:32
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.
Pingback: WordPress Picks for the Week [01/03] | Techtites
by san on 27 January, 2010 at 18:13
I've try this tips, but i am still confuse about this tips because i'm a newbie.