Skip to content
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

Lighthouse was unable to download your robots.txt file #6275

Closed
einerdinger opened this issue Oct 15, 2018 · 5 comments
Closed

Lighthouse was unable to download your robots.txt file #6275

einerdinger opened this issue Oct 15, 2018 · 5 comments

Comments

@einerdinger
Copy link

Hi everybody
Testing my Website with Lighthouse I always get the message in the SEO-section

"robots.txt is not valid
Lighthouse was unable to download your robots.txt file
"

But robots.txt IS valid, it is a plain text file, it resides in the root directory, access rights are OK AND it is found and testified as correct by any other performance analyzer tool.

The site is https://heilendehände.de (which means healing hands) and as you can see, it is an IDN with a "Umlaut" in the name. The internally translated ACE-string is http://xn--heilendehnde-ocb.de

Maybe, not finding robots.txt has something to do with this IDN, but that's just an assumption of mine.

Any idea?

Thanks in advance
Bernhard

@patrickhulce patrickhulce changed the title robots.txt is not valid Lighthouse was unable to download your robots.txt file Lighthouse was unable to download your robots.txt file Oct 15, 2018
@patrickhulce
Copy link
Collaborator

Thanks for filing @einerdinger!

It seems like it's actually failing because of your content security policy.

image

We try to fetch the robots.txt in the context of your page, so we occasionally run into limitations like this. Fixing would require us to fetch the robots.txt in another context. There are a few other cases like this where we could also speed things up, so it's a good move for us to do in the future 👍

@einerdinger
Copy link
Author

Hi Patrick
and thanks for the lightning fast answer. CSP is a good point and I will add the connect-src directive, but I need to know the url to allow it. I can see a red alert message, but it disappears too fast
best regards
Bernhard

@patrickhulce
Copy link
Collaborator

It's added as a content script, so no particular URL. I'm not 100% sure if it's classified as unsafe-inline or not. self might do the trick already, I haven't tested it out yet sorry! :)

@einerdinger
Copy link
Author

Hi again
connect-src 'self' did the job!
Thanks again

@laukstein
Copy link

@einerdinger, fyi there is 1+ year old bug open for this #4386

nhoizey added a commit to nhoizey/nicolas-hoizey.com that referenced this issue Jan 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants