No: 'noindex' detected in 'robots' meta tag
Have added production variables in .en Have editied plugin settings to remove logic.
Google still reports noindex detected.
This is really in need of fixing
To add to this - turned off plugin and google console reports all fine.
Should be fixed or removed from Craft store
In order to resolve this, your .env must have a CRAFT_ENVIRONMENT=production set. Otherwise, the plugin will assume the site is stage or dev and set it to noindex.
Yes I have done this too. It doesn't work. Plugin Setting show robots.txt logic using this. Take out the if production logic - noindex heading still persists. Turn off plugin and Google console will index it. I'll have another deep dive on this later today but there does seem an issue.
I've 'fixed' this with adding:
vendor/ether/seo/src/services/SeoService.php
// headers do not seem to be setting properly so adding this explicitly if (Craft::$app->env == 'production') { $headers->set('x-robots-tag', 'all'); return; }
It seems without explicitly setting to index and relying on the false test !=='production' Craft is sets to 'none' by default - seeming to ignore the attempt later doewn to use the control panel robots text to also set this .
Not really sure whats going on here and have filed a question with craft repo about default X-Robots settings.
Additionally the issue is worse :)
in model SEOdata the robot meta tag (line 353)
<meta name="robots" content="WHATGOESHERE?" />
is also an issue.
for some reason this code
if (Craft::$app->config->general->devMode) return 'none, noimageindex';
seems to fail to detect devMode.
devMode is false in .env and config but still returns true.
My solution was to add: if (Craft::$app->env == 'production') return 'all'
Real mystery is why craft keeps returning devmode as true
Just to update Craft maintainers cant replicate any failure to detect devMode / environment. Plugin logic works as per Craft plugin should however the problem still persists. However it is solved by explcitly declaring production all as in the two examples above.