Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: Bilinda on April 18, 2008, 08:17:00 AM

Title: I have a no follow rule in my brand new downloaded index??
Post by: Bilinda on April 18, 2008, 08:17:00 AM
Hi everyone, brand new here, the name's Bilinda. I know a bit about php, but not much. I just installed my first forum, version 1.1.4.

It's all working great, but I noticed something in the index template. Right where your meta tags are I have this code:

<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
   <meta name="robots" content="noindex" />', '

As far as I know, that's telling search engines not to follow the page? I want my forum to be spidered, so should I get rid of that, and if so, how? Are there any other code issues I should change?

That's it so far, the rest I just need to study more. Thanks everyone, glad to be here! :D

Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: rsw686 on April 18, 2008, 08:24:55 AM
The noindex value is only placed if the $context value is set. View the source of the actual forum pages and you'll see that it only shows up on some pages.
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: Bilinda on April 18, 2008, 08:46:19 AM
Thank you for the quick reply rsw686! So, your saying I should just leave it alone, that it's for duplicate stuff? I'm not sure what "$context value is set" is. Is that something I should do, or just leave it alone? Thanks again!
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: Eliana Tamerin on April 18, 2008, 09:13:46 AM
No, it tells the search engines not to spider the page only if the specific value there (robot_no_index) is set. I'm not sure exactly where that's set, though. Probably somewhere in the admin settings or settings.php. Or it could be a small feature that has to be set manually somewhere.

You could probably find out what robot_no_index does in Load.php.
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: ccbtimewiz on April 18, 2008, 09:20:39 AM
<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
   <meta name="robots" content="noindex" />', '


This could also be read as:

(DO NOT ADD/MODIFY YOUR TEMPLATES)

<meta name="description" content="', $context['page_title'], '" />';

if (empty($context['robot_no_index']))
     echo '
          <meta name="robots" content="noindex" />';


Or, in english:

If I have set my forum to allow spiders in the admin panel, then let them be. However, if I didn't, please ignore this code.
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: rsw686 on April 18, 2008, 10:01:19 AM
Quote from: Eliana Tamerin on April 18, 2008, 09:13:46 AM
I'm not sure exactly where that's set, though. Probably somewhere in the admin settings or settings.php.

It disabled the spiders on print version of the pages, etc. The setting is fine how it is. Like I said when viewing a page in the browser, if you right-click and view the source, you can easily see which pages are affected by the noindex and which are not.
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: Bilinda on April 18, 2008, 10:19:56 AM
OK, I see now. Thanks for all the help everyone, I appreciate it!
:)
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: karlbenson on April 18, 2008, 11:07:41 AM
Yeah this is how SMF warns search engines about duplicated content or pages not of any use.
If you have any further questions about it, I can try to answer them.

But for 99.99% of people it is best left untouched.
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: Eliana Tamerin on April 18, 2008, 11:26:39 AM
Oh, now I remember. It's set in the source pages, isn't it?
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: CmptrWz on April 18, 2008, 11:44:51 AM
So that search engines don't index the same page being referenced in different ways, as well as pages that should not be indexed, when pages are accessed through specific means they are told to not index them.

I believe this includes, but is not limited to, searching, printing, replying, and new topics, just to name a few.
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: karlbenson on April 18, 2008, 12:23:26 PM
Indeed. And in SMF 2.x alot more.
And if you've seen the bug tracker, you'll also notice i've pointed out more further to come ;)
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: Bilinda on April 18, 2008, 12:39:11 PM
QuoteI believe this includes, but is not limited to, searching, printing, replying, and new topics, just to name a few.

But why would you want to block new topics? A forum is a gold mine for search terms, but not if the spiders can't index it.

I just heard from a friend who uses two SMF, and he says google seems to have lots of crazy stuff indexed like search, password, stuff like that but no post or topics!?
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: karlbenson on April 18, 2008, 12:41:39 PM
They aren't blocking new topics.
I believe CmptrWz is referring to the POST screen.

So the topic/post is indexable.
http://www.simplemachines.org/community/index.php?topic=234844.0

But the post reply/ create topic screen is noindexed
http://www.simplemachines.org/community/index.php?action=post;topic=234844.0
Plus if the individual msg link is used that is noindexed
http://www.simplemachines.org/community/index.php?topic=234844.msg1512565#msg1512565
It is duplicated content. (since it shows exactly the same content just via a slightly different url) [you may get penalised in search engines for duplicated content].
Title: Re: I have a no follow rule in my brand new downloaded index??
Post by: Bilinda on April 18, 2008, 12:55:36 PM
Oh, I see. Ok, thanks for all the help. I love the forum so far, it's been very easy to set up!