Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noindex, nofollow for single page
#1
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?
Reply
#2
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">'; ?>
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
#3
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.
Reply
#4
It works perfect. Great! Thanks a lot.
Reply
#5
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.
Reply
#6
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!
Reply
#7
ccagle8 Wrote:this could be developed as a simple yet very useful standalone plugin too.
Done: MetaRobots Plugin
Reply
#8
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.
Reply
#9
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.
Reply
#10
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.
Reply




Users browsing this thread: 1 Guest(s)