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?
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) { ?>
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!
Re: How Do I Get Rid Of Nofollow & NO Index tags?
Re: How Do I Get Rid Of Nofollow & NO Index tags?
Re: How Do I Get Rid Of Nofollow & NO Index tags?
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
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
Re: How Do I Get Rid Of Nofollow & NO Index tags?
Quote:
Originally Posted by
ptowers49
... 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
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?
Re: How Do I Get Rid Of Nofollow & NO Index tags?
tried the debugger and got this error reported
[24-Nov-2009 17:02:51] PHP Parse error: syntax error, unexpected $end in C:\wamp\www\zencart2\includes\templates\glacial_age\common\html_header.php on line 165
LIne 165 is the blank line at the end of the file. 162/3/4 & 5 listed below!!
?>
</head>
<?php // NOTE: Blank line following is intended: ?>
any ideas?
Re: How Do I Get Rid Of Nofollow & NO Index tags?
"Unexpected $end" means you've got mismatched braces or brackets, presumably from "deleting the line" as you mentioned in an earlier post.
I disagree with your statement that "I think it is better to have robots everywhere than no robots at all!!". That's overkill. Using the default Zen Cart code as distributed in the original files in the template_default folder will cause it to work optimally. There's no need to delete/comment anything about robots metatags.
Re: How Do I Get Rid Of Nofollow & NO Index tags?
I agree I do want it to work with the robot control functionality.
The unexpected $end error is the one I get when I delete the 2 // as sugested in the zencart fix, not from deleing the lines of code.!!!
any more insight?
Re: How Do I Get Rid Of Nofollow & NO Index tags?
You shouldn't encounter any "Unexpected $end" errors if you make the change suggested earlier in this discussion, found here: http://www.zen-cart.com/forum/showth...513#post809513