Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Nov 2009
    Posts
    11
    Plugin Contributions
    0

    Default How Do I Get Rid Of Nofollow & NO Index tags?

    Hi,

    I cant seem to figure out to get rid of the no index and nofollow tags, I have checked the /includes/languages/english/meta_tags.php file and in ROBOTS_PAGES_TO_SKIP there is only: 'login,logoff,create_account,account,account_edit,account_history,account_histor y_info,account_newsletters,account_notifications,account_password,address_book,a dvanced_search,advanced_search_result,checkout_success,checkout_process,checkout _shipping,checkout_payment,checkout_confirmation,cookie_usage,create_account_suc cess,contact_us,download,download_timeout,customers_authorization,down_for_maint enance,password_forgotten,time_out,unsubscribe,info_shopping_cart,popup_image,po pup_image_additional,product_reviews_write,ssl_check');
    But I am getting the tag on a number of other pages not listed here including the home page.
    Any Ideas?

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,250
    Plugin Contributions
    3

    Default Re: How Do I Get Rid Of Nofollow & NO Index tags?

    Did you perhaps delete the following line, or change its parameters, in templates/template_default/templates/common/html_header.php

    PHP Code:
    <?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance' || $robotsNoIndex === true) { ?>
    18 years a Zencart User

  3. #3
    Join Date
    Aug 2009
    Location
    Greeneville, TN USA
    Posts
    51
    Plugin Contributions
    0

    bug Re: How Do I Get Rid Of Nofollow & NO Index tags?

    I've found an error in the html_header.php I have installed on several sites. Since they are all v1.3.8a, I'm not sure exactly when this would have come in. They are all recent installs from separate hosting companies.

    Portions of the code controlling ROBOTS_PAGES_TO_SKIP have been commented out, it looks like a debugging thing.

    It should read...

    Code:
    <?php if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance') { ?>
    <meta name="robots" content="noindex, nofollow" />
    <?php } ?>
    Instead it reads...

    Code:
    <?php //if (defined('ROBOTS_PAGES_TO_SKIP') && in_array($current_page_base,explode(",",constant('ROBOTS_PAGES_TO_SKIP'))) || $current_page_base=='down_for_maintenance') { ?>
    <meta name="robots" content="noindex, nofollow" /> 
    <?php //} ?>
    Notice the extra "//" in two places. Remove those, and you should be fine. The way it reads, it ALWAYS has the noindex, nofollow, even on your home page!

  4. #4
    Join Date
    Nov 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: How Do I Get Rid Of Nofollow & NO Index tags?

    Thanks you both Rock!!!

  5. #5
    Join Date
    Aug 2009
    Location
    Greeneville, TN USA
    Posts
    51
    Plugin Contributions
    0

    Default Re: How Do I Get Rid Of Nofollow & NO Index tags?


  6. #6
    Join Date
    Nov 2009
    Posts
    11
    Plugin Contributions
    0

    Default Re: How Do I Get Rid Of Nofollow & NO Index tags?

    Cheers mate

  7. #7
    Join Date
    Aug 2009
    Location
    UK
    Posts
    71
    Plugin Contributions
    0

    Default Re: How Do I Get Rid Of Nofollow & NO Index tags?

    Taking out the forward slashes on my last zencart site worked fine but now on www.electrical-and-plumbing-supplies.co.uk this now just returns a black page!!!

    any ideas?

    or is there another way around this issue

  8. #8
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,250
    Plugin Contributions
    3

    Default Re: How Do I Get Rid Of Nofollow & NO Index tags?

    I see you've removed the entire section governing noindex and nofollow.

    This is a bit silly... The php there hepls to control indexing of a lot of stuff that should not be indexed...


    I can see your site (except the header - if you have one), but that is probably due to one of your customizations in tpl_header.php, not anything that was done in html_header.php
    18 years a Zencart User

  9. #9
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

    Default Re: How Do I Get Rid Of Nofollow & NO Index tags?

    Quote Originally Posted by ptowers49 View Post
    ... this now just returns a black page!!!
    FAQ on troubleshooting your errors which are causing blank pages: https://www.zen-cart.com/tutorials/index.php?article=82
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Aug 2009
    Location
    UK
    Posts
    71
    Plugin Contributions
    0

    Default Re: How Do I Get Rid Of Nofollow & NO Index tags?

    I deleted the line because I think it is better to have robots everywhere than no robots at all!! I do recognise that this is not the best solution. I take it can't be a PHP syntax error. I did not change tpl_header.php just stylesheet.css and includes/ languages/English/ glacial age / header . I haven't finished the style work yet but wanted to sort these issues first.

    My PHP knowledge is pretty limited... any ideas?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Index filters & meta tags
    By flashy275 in forum General Questions
    Replies: 0
    Last Post: 5 Jan 2011, 01:14 AM
  2. Home url is showing /index.php. How to get rid of it?
    By Sounpopular in forum General Questions
    Replies: 0
    Last Post: 18 Nov 2010, 05:34 PM
  3. How do I get rid of the advertisement on the bottom of my index.php page?
    By moonlight in forum Installing on a Windows Server
    Replies: 2
    Last Post: 17 Jan 2010, 12:50 AM
  4. Replies: 3
    Last Post: 9 Oct 2007, 04:05 PM
  5. Yellow & Orange Login Box:: Get Rid??
    By Linux in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 22 Jun 2007, 07:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR