bbeer Posted February 1, 2016 Share Posted February 1, 2016 Hi All on quite a huge site we have several oem products (pages) that are set to hidden and are not supposed to show up in any search result. Unfortunately they show up in google searches, when searched for with the title. how can we prevent them from showing up? Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 1, 2016 Share Posted February 1, 2016 if($page->isHidden()){ echo '<meta name="robots" content="noindex">'; } 2 Link to comment Share on other sites More sharing options...
bbeer Posted February 1, 2016 Author Share Posted February 1, 2016 Thanks LostKobrakai will try this right away. Link to comment Share on other sites More sharing options...
LostKobrakai Posted February 1, 2016 Share Posted February 1, 2016 But this will only work if you don't deny robots access to those pages, otherwise they'll index just by links from other pages. At least that's what google says about it. 1 Link to comment Share on other sites More sharing options...
Sergio Posted February 1, 2016 Share Posted February 1, 2016 Notice that it's not guaranteed that other search engines will not index your content. A robot.txt can be ignored, it's not mandatory. The safest way to hide the pages is by unpublished them or restrict access via a form or an Apache password, for instance. Link to comment Share on other sites More sharing options...
adrian Posted February 1, 2016 Share Posted February 1, 2016 There is a protect hidden pages option in PageProtector. Or you could do: if($page->isHidden()){ throw new Wire404Exception(); } but I am not sure you whether you actually need to give users access to these hidden pages or not. With PageProtector logged in users will be able to see the hidden pages, so maybe that is OK for your use case? Link to comment Share on other sites More sharing options...
Peter Knight Posted February 1, 2016 Share Posted February 1, 2016 are set to hidden and are not supposed to show up in any search result. AFAIK Set to hidden in ProcessWire only means that pages are hidden within PW when searched via the front end via a PW search. They've no relation to Googles index. I've always thought that Hidden: Excluded from lists and searches should be split into three Hidden: Hide from menus and PW selector calls (unless explicitly over-ridden) UnSearchable: Doesn't display in search results performed via the website Don't Index: Hide from Google bots and don't display in Google's index I'm probably approaching this from a method I used in another CMS Link to comment Share on other sites More sharing options...
Macrura Posted February 2, 2016 Share Posted February 2, 2016 @Peter AFAIK if they are hidden then they shouldn't show up in searches to not index an internal link, add rel='nofollow' to any links to hidden pages, or add the noindex meta tag; also make sure you don't have a sitemap listing those hidden pages if there is no link to a page somewhere on your site then it shouldn't get indexed, unless i'm missing something Link to comment Share on other sites More sharing options...
bbeer Posted February 2, 2016 Author Share Posted February 2, 2016 @ adrian I can't throw a 404, as this pages are used in lists. I don't know PageProtector but will have a look at. @ Peter Knight so far there is no UnSearchable or Don't Index right now as standard feature. However, that would be great. @ Macrura we have now added the noIndex meta tag to those hidden pages. I hope that will solve the problem. They don't show up in sitemaps nor in xml sitemaps. Link to comment Share on other sites More sharing options...
mr-fan Posted February 2, 2016 Share Posted February 2, 2016 In a former CMS there was a very practical "private" state - this means that this kind of pages/content could only be accessable if a user was logged in - but they where in the menu/lists - and you can combine both states hidden + private... Link to comment Share on other sites More sharing options...
Peter Knight Posted February 2, 2016 Share Posted February 2, 2016 Don't forget if you're using Pete's XML site map Module that it auto adds new pages to the site map. But ... "It also adds a field called sitemap_ignore that you can add to your templates and exclude specific pages on a per-page basis. Again, this assumes that you wish to ignore that page's children as well." 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