Luigi Donato Posted July 11, 2022 Share Posted July 11, 2022 Greetings, I would like to make the tag links indexable, so I added the hash (#) to the rules concerned, then I added the same rules, but with Allow instead of Disallow. The suspected lines are as follows: Allow: /*?tag= Allow: /*en/search?tag= #Disallow: /*?tag= #Disallow: /*en/search Also I noticed there was an HTML tag: <meta name="robots" content="{$page.meta.robots}"> So I created a rule to prevent it from appearing in the tag pages and I succeeded, but according to Google and also according to other sites, the pages are blocked by the robots.txt file.. Can anyone enlighten me? Link to comment Share on other sites More sharing options...
webprog Posted July 11, 2022 Share Posted July 11, 2022 There are two lines for tags can be in robots.txt: Disallow: /*?tag= Disallow: /*&tag= So, you need to allow all of them. Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 12, 2022 Author Share Posted July 12, 2022 Well, leaving aside the fact that I would only need those without &, I tried to add that rule to Allows too, but they still get blocked. Other ideas? Link to comment Share on other sites More sharing options...
webprog Posted July 12, 2022 Share Posted July 12, 2022 Did you try to insert the tag page into google index manually, in google webmaster? Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 12, 2022 Author Share Posted July 12, 2022 Just now, webprog said: Did you try to insert the tag page into google index manually, in google webmaster? Yes Link to comment Share on other sites More sharing options...
webprog Posted July 12, 2022 Share Posted July 12, 2022 Can you show, the browser code of your tag page? Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 12, 2022 Author Share Posted July 12, 2022 Yes: The only weird thing I notice is this part, in the var prestashop line: {"title": "Search", "description": "", "keywords": "search", "robots": "noindex"} Link to comment Share on other sites More sharing options...
webprog Posted July 12, 2022 Share Posted July 12, 2022 Everything looks right. I think better to try to change SearchController.php function in controllers folder: public function getTemplateVarPage() { $page = parent::getTemplateVarPage(); $page['meta']['robots'] = 'noindex'; return $page; } Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 12, 2022 Author Share Posted July 12, 2022 This would only have the effect of not making the meta robots appear, but that problem has already been fixed. Anyway, to be safe I tried and nothing has changed. Link to comment Share on other sites More sharing options...
webprog Posted July 17, 2022 Share Posted July 17, 2022 I have tested on my hosting and got the same result as you. But after I request Google to refresh the robots.txt - google have added to index the search page. And now it is ok. So you need to request Google to refresh robots.txt - https://www.google.com/webmasters/tools/robots-testing-tool?siteUrl= Google don't refresh robots.txt everytime when you add link. Link to comment Share on other sites More sharing options...
Luigi Donato Posted July 19, 2022 Author Share Posted July 19, 2022 On 7/17/2022 at 11:08 AM, webprog said: I have tested on my hosting and got the same result as you. But after I request Google to refresh the robots.txt - google have added to index the search page. And now it is ok. So you need to request Google to refresh robots.txt - https://www.google.com/webmasters/tools/robots-testing-tool?siteUrl= Google don't refresh robots.txt everytime when you add link. I noticed it too yesterday and I solved it as you said, thanks anyway 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