Posts: 4
Threads: 2
Joined: Feb 2012
Hi!
I am a begginer in GetSimple and I have a first problem.
How i can block Google boots on a single page (no entire domain)?
I wanto to get <meta name="robots" content="noindex, nofollow"> (or else) in my single page, eg. noindex for mydomain.com/contact?
I would like to block a single page for robots only.
I don't see this option in GetSimple panel, mabey some plugin or how do it myself?
Posts: 2,094
Threads: 54
Joined: Jan 2011
jasiek7 Wrote:Hi!
I am a begginer in GetSimple and I have a first problem.
How i can block Google boots on a single page (no entire domain)?
I wanto to get <meta name="robots" content="noindex, nofollow"> (or else) in my single page, eg. noindex for mydomain.com/contact?
I would like to block a single page for robots only.
I don't see this option in GetSimple panel, mabey some plugin or how do it myself?
If it's for a single page, the easiest way is to put the following directly into your template's head (Admin Theme/Edit Theme):
Code:
<?php if (return_page_slug() == 'contact') echo '<meta name="robots" content="noindex, nofollow">'; ?>
Posts: 3,491
Threads: 106
Joined: Mar 2010
Or you could replace in your template:
Code:
<meta name="robots" content="index, follow" />
by:
Code:
<?php if (return_page_slug() == 'contact') { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } else { ?>
<meta name="robots" content="index, follow" />
<?php } ?>
That is, if you also want the rest of the pages to have that meta.
Posts: 4
Threads: 2
Joined: Feb 2012
It works perfect. Great! Thanks a lot.
Posts: 58
Threads: 9
Joined: Jan 2012
Thanks to Carlos and
n00dles101 I have constructed the following solution with
I18N Custom Fields Plugin to have the possibility to
change the standard value for every page:
In the template:
Code:
<?php if (return_custom_field('robots') != '') { ?>
<meta name="robots" content="<?php get_custom_field('robots'); ?>" />
<?php } else { ?>
<meta name="robots" content="index, follow" />
<?php } ?>
I18N Custom Field setting in /data/other/customfields.xml (or set it up in Custom Fields configuration)
Code:
<item>
<desc><![CDATA[robots]]></desc>
<label><![CDATA[Robots Meta Tag]]></label>
<type><![CDATA[dropdown]]></type>
<value><![CDATA[index, follow]]></value>
<option><![CDATA[index, follow]]></option>
<option><![CDATA[index, nofollow]]></option>
<option><![CDATA[noindex, follow]]></option>
<option><![CDATA[noindex, nofollow]]></option>
</item>
You can control robots also with
robots.txt in the (sub)domain root.
Advanced HTML5 & CSS3 coder. Simple JS & PHP hacker (not enough for new function coding). Build one webpage with GS (late 2012). Focusing on Theme customizing/Template files. Experience with WP.
Posts: 1,848
Threads: 86
Joined: Aug 2009
this could be developed as a simple yet very useful standalone plugin too.
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 661
Threads: 52
Joined: Feb 2011
ccagle8 Wrote:this could be developed as a simple yet very useful standalone plugin too.
Done:
MetaRobots Plugin
Posts: 58
Threads: 9
Joined: Jan 2012
2012-03-17, 08:16:04
(This post was last modified: 2012-03-17, 08:16:30 by VioletJim.)
Thanks! Nice work mikeh. As I use I18N Custom Fields Plugin already with this template and like to avoid to install many more plugins, I prefer the template solution for now, but nice that the GS-plugin-community is very active and fast.
I hope with time "over 2/3 use it plug-ins" crystallized out and are either integrated into the core or are particularly well supported. That would be a great step for GS, because I changed also from WP, because many do not care to update the plugins I used and this is stressing.
I have some in my mind; MetaRobots Plugin could evolve/integrate to a "SEO Plugin" or something similar doing some more things and so on.
Advanced HTML5 & CSS3 coder. Simple JS & PHP hacker (not enough for new function coding). Build one webpage with GS (late 2012). Focusing on Theme customizing/Template files. Experience with WP.
Posts: 661
Threads: 52
Joined: Feb 2011
ChriS Wrote:Thanks! Nice work mikeh. As I use I18N Custom Fields Plugin already with this template and like to avoid to install many more plugins, I prefer the template solution for now, but nice that the GS-plugin-community is very active and fast.
I hope with time "over 2/3 use it plug-ins" crystallized out and are either integrated into the core or are particularly well supported. That would be a great step for GS, because I changed also from WP, because many do not care to update the plugins I used and this is stressing.
I have some in my mind; MetaRobots Plugin could evolve/integrate to a "SEO Plugin" or something similar doing some more things and so on.
I have been working on a separate
"SEO" plugin for quite some time. I should have it released to extend later tonight. I will make it include this feature as well.
Posts: 6
Threads: 1
Joined: Mar 2012
ChriS Wrote:You can control robots also with robots.txt in the (sub)domain root.
...but you can´t prevent sites getting indexed with robots.txt - therefore mikeh´s plugin is a good solution. Even better would be a select field with "index/follow" / "noindex/follow" / "index/nofollow" / "noindex/nofollow" to fully use the seo advantage of the robots meta tag.