-
Notifications
You must be signed in to change notification settings - Fork 672
Issue with X-Robots-Tag response header set to none [3.x]: #13063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is almost certainly being added by your Ether SEO plugin. Make sure you have an |
Our .env file is setting it to production. We have this line added to .env ENVIRONMENT="production". it gets loaded by bootstrap file. |
To add to what @tgupta-adc has said, we do have the environment variable defined. We also tried disabling the SEO plugin in our test environment to see if that would resolve the issue, with no luck. Is there any other information I can give to help troubleshoot this issue? |
Is the site cached with Cloudflare, etc., which could be serving old content? |
No, we cleared cache couple of times. Also we have been using Craft for more than 2 years and it has always been set to none. |
What happens if you remove the |
Do you mean like this? DISALLOW_ROBOTS=false That would just result in it getting set to the string Which means this condition: Lines 174 to 182 in d261955
would end up passing, because it would effectively be: if (
'false' ||
// ... Which would equate to You should either not be setting DISALLOW_ROBOTS=0 In Craft 4, however, 'disallowRobots' => craft\helpers\App::env('DISALLOW_ROBOTS'), |
In case that was the culprit, I’ve gone ahead and made Craft more defensive of those values for the next Craft 3 release (b4c6f95). |
@brandonkelly When do we expect this version to be live? |
Should go out tomorrow! You can update earlier by changing your
then run |
Craft 3.8.7 is out now. Going to close this, assuming it was in fact the issue. |
What happened?
Description
We are running craft 3.7 and all of our pages' response header include x-robots-tag: none. We are trying to find out how to remove this, or set it to all, so our page can get indexed by crawlers.
In general.php, we have disallowRobots => geten('DISALLOW_ROBOTS'). And DISALLOW_ROBOTS is set to false
Please let me know if you need more information
Steps to reproduce
Expected behavior
Actual behavior
Header response value is X-Robots-Tag:none
Craft CMS version
3.7
PHP version
7.4.16
Operating system and version
entOS 7
Database type and version
MySQL version 8.0.29
Image driver and version
No response
Installed plugins and versions
the only customization on this plugin, is under the robots tab, which is
{# Sitemap URL #}
Sitemap: {{ url(seo.sitemapName ~ '.xml') }}
User-agent: *
Disallow: /cpresources/
The text was updated successfully, but these errors were encountered: