Allan - Fungadgets.dk Posted October 3, 2011 Share Posted October 3, 2011 I would like to have "Noindex" on some of my pages. In the header.tpl it looks like i should be able to set "nobots" in this code: <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> But i can't finde where to set this. I hope someone can help me. Link to comment Share on other sites More sharing options...
shacker Posted October 3, 2011 Share Posted October 3, 2011 header.tpl its only one for all the pages. but you can add this code {if $page_name=='index'} your meta code here {/if} page name can be product, cms, or any page Link to comment Share on other sites More sharing options...
Allan - Fungadgets.dk Posted October 3, 2011 Author Share Posted October 3, 2011 Hi Shacker Thank you So i can add this in the header.tpl? {if $page_name=='cart.php,best-sales.php,cms.php'} <meta name="robots" content="noindex,follow" /> {/if} What about module pages. Do i need to add: /modules/onepagecheckout/order-opc.php to get the "noindex" on that page? Link to comment Share on other sites More sharing options...
shacker Posted October 3, 2011 Share Posted October 3, 2011 nop, dont put the ext. {if $page_name=='cart'} <meta name="robots" content="noindex,follow" /> {/if} i think order-opc for module page, or validation, etc Link to comment Share on other sites More sharing options...
Allan - Fungadgets.dk Posted October 3, 2011 Author Share Posted October 3, 2011 It almost works for me I added this to the header.tpl {if $page_name=='best-sales'} <meta name="robots" content="noindex,follow" /> {/if} But how do i remove the old meta tag? As it is now, i have 2 robots meta tags on this site: http://fashioneyewear.dk/best-sales Link to comment Share on other sites More sharing options...
shacker Posted October 3, 2011 Share Posted October 3, 2011 replace the original line with {if $page_name=='index'} <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> {/if} Link to comment Share on other sites More sharing options...
Allan - Fungadgets.dk Posted October 3, 2011 Author Share Posted October 3, 2011 So if i understand it correctly i need to put both {if $page_name=='index'} <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> {/if} And {if $page_name=='cart'} <meta name="robots" content="noindex,follow" /> {/if} in the header.tpl? And then i need to type in all the pages (card, best-sales, new-products........) in the two codes? Link to comment Share on other sites More sharing options...
Allan - Fungadgets.dk Posted October 3, 2011 Author Share Posted October 3, 2011 And another problem is that i only can add one page into the code. Link to comment Share on other sites More sharing options...
shacker Posted October 3, 2011 Share Posted October 3, 2011 yes, and remove the original meta tag without the IF, and you can make a lot of {if $page_name=='cart'} instances for each page that you need Link to comment Share on other sites More sharing options...
Allan - Fungadgets.dk Posted October 3, 2011 Author Share Posted October 3, 2011 Thank you shacker I just don't understand why PS haven't made an easy funktion to put "noindex" on certain pages. This solution is a lot off work. But it is so impotent due to dublicate content. Link to comment Share on other sites More sharing options...
shacker Posted October 3, 2011 Share Posted October 3, 2011 change the title to solved if this works for you. regards Link to comment Share on other sites More sharing options...
Allan - Fungadgets.dk Posted October 3, 2011 Author Share Posted October 3, 2011 Update! I found a much easyer way I used: {if $page_name=='best-sales'} <meta name="robots" content="noindex,follow" /> {elseif $page_name=='new-products'} <meta name="robots" content="noindex,follow" /> {else} <meta name="robots" content="index,follow" /> {/if} Then i only have to add the pages i want "noindex" on, and then i use {else} for all other pages 1 Link to comment Share on other sites More sharing options...
pcitshop Posted December 31, 2011 Share Posted December 31, 2011 should it not be <meta name="robots" content="noindex, nofollow" /> Link to comment Share on other sites More sharing options...
pcitshop Posted December 31, 2011 Share Posted December 31, 2011 {if $page_name=='best-sales'} <meta name="robots" content="noindex, nofollow" /> {elseif $page_name=='new-products'} <meta name="robots" content="noindex, nofollow" /> {else} <meta name="robots" content="index,follow" /> {/if} above codes works on pages only provides pages names are non-friendly url and it does not work on module pages? Suggestion, turn off friendly url then note down the pages names you dont want index,follow on, test the codes then turn seo friendly urls on What can be done for module pages noindex? Link to comment Share on other sites More sharing options...
shacker Posted January 8, 2012 Share Posted January 8, 2012 this need to modify the header.tpl, so a module must rewrite the header file to do that Link to comment Share on other sites More sharing options...
gswant Posted January 13, 2012 Share Posted January 13, 2012 I want to put this page in noindex: / modules / maofree_askmoreinfo / askmoreinfo_form.php? id_product = 559 If I use: {if $ page_name == 'askmoreinfo_form'} <meta name="robots" content="noindex, follow" /> {else} <meta name="robots" content="index,follow" /> {/ if} It does not work. askmoreinfo_form could be because it is not in the root and is part of a module? Thanks to all Link to comment Share on other sites More sharing options...
Teapot Creative Posted April 4, 2012 Share Posted April 4, 2012 Hi Any update on this issue to apply noindex to modules... really do need this!!! Nick Link to comment Share on other sites More sharing options...
cliqadam Posted March 20, 2013 Share Posted March 20, 2013 All you have to do is add the pages to your Robots.txt file and block it there disallow: /best-sale no need to go to the script. If robots text is blocking the page than it does not matter what tags are in the page itself. You also dont need the follow tag if the page is blocked because there is no page rank for the page anyways because its blocked. Link to comment Share on other sites More sharing options...
dorje Posted December 6, 2013 Share Posted December 6, 2013 Hi all Just tried of trying to add <meta name="robots" content="noindex, nofollow" /> in certain cms pages. I did add all these codes in header .tpl but none of these worked. "{if $page_name=='cms.php?id_cms=12'} <meta name="robots" content="noindex, nofollow" /> {else} <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> {/if} " {if $page_name=='/content/12-links"} <meta name="robots" content="noindex, nofollow" /> {else} <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> {/if} {if $page_name=='links"} <meta name="robots" content="noindex, nofollow" /> {else} <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> {/if} {if $_SERVER['REQUEST_URI']=='/content/12-links'} <meta name="robots" content="noindex, nofollow" /> {else} <meta name="robots" content="{if isset($nobots)}no{/if}index,follow" /> {/if} http://www.prestasho...ow-i-need-help/ This post is solved but the solutions are not working. My store version 1.4.7.3 prestashop really need to put these kinds of basic features and yet these features are still not available in 1.5 and also in 1.6 i guess. Link to comment Share on other sites More sharing options...
rob84 Posted February 4, 2014 Share Posted February 4, 2014 Hi all Just tried of trying to add <meta name="robots" content="noindex, nofollow" /> in certain cms pages. I did add all these codes in header .tpl but none of these worked. [...] This post is solved but the solutions are not working. My store version 1.4.7.3 prestashop really need to put these kinds of basic features and yet these features are still not available in 1.5 and also in 1.6 i guess. This will work: {if strpos($page_name, "a_part_of_url_page") !== false} <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW"> {/if} This one search for a word that is a part of $page_name, and write instructions when found. If not sure what prints out $page_name in a particular page, simple try before {$page_name} and see what match for you Link to comment Share on other sites More sharing options...
nipun Posted May 29, 2014 Share Posted May 29, 2014 hi ,how can i add noindex & nofollow in particular CMS page Like {* /content/9-featured-products-blog *} and particular CATEGORY page Like {* /30-testing*} In PrestaShop V. 1.5.6Please Helpthank you Link to comment Share on other sites More sharing options...
srana Posted February 1, 2016 Share Posted February 1, 2016 (edited) Here is the perfect module for you all those are in need to use NOINDEX or NOFOLLOW options on different pages for better SEO. SEO NOindex,follow (handles Duplicate content) Module Features: - Canonical url for Category, New Product, Top Sellers, Price Drop, Suppliers, Manufacturers, pagination (?p=1,p=2..) to avoid duplicate content for SEO. - Optimize search results for all search engines - Get rid of mass indexing for unnecessary pages. - Set FOLLOW/ NOFOLLOW option for each page. - Set INDEX/ NOINDEX option for each page. - Set INDEX & FOLLOW options for Categories, Products, CMS, CMS Categories, Default and Modules pages. - Select YES/ NO All and UNDO buttons to set options quickly. - Update ROBOTS.TXT file from module configuration directly. Edited March 21, 2018 by srana solution is updated. (see edit history) Link to comment Share on other sites More sharing options...
srana Posted October 12, 2016 Share Posted October 12, 2016 Hi All, There is a perfect module for handing NOIndex/ Index and follow options. You can set these options for individual pages easily. SEO NOindex,follow (handles Duplicate content) http://addons.prestashop.com/en/21485-seo-noindexfollow-handles-duplicate-content.html I hope you find it helpful and fulfill all needs. Have a nice day!! Link to comment Share on other sites More sharing options...
Timmur Posted March 23, 2017 Share Posted March 23, 2017 (edited) There is also this module: --> Here Edited March 23, 2017 by Timmur (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now