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

rel="canonical" different domain false negative #4440

Closed
ghost opened this issue Feb 6, 2018 · 5 comments
Closed

rel="canonical" different domain false negative #4440

ghost opened this issue Feb 6, 2018 · 5 comments

Comments

@ghost
Copy link

ghost commented Feb 6, 2018

States "Document does not have a valid rel=canonical. Points to a different domain."

This is not true for the sites I ran it for.

There appears to be a bug.

@rviscomi
Copy link
Member

rviscomi commented Feb 6, 2018

Hi @callmenicholi thanks for your bug report! Can you provide the URLs of the pages you tested so we can reproduce the issue?

cc @kdzwinel

@rviscomi rviscomi changed the title rel=canonical rel="canonical" different domain false negative Feb 6, 2018
@ghost
Copy link
Author

ghost commented Feb 6, 2018

You can use The Hangout for testing.

@rviscomi
Copy link
Member

rviscomi commented Feb 6, 2018

Thanks! Here's the result of my test run: https://googlechrome.github.io/lighthouse/viewer/?gist=646764b85fff44a845944b905fe26dd8

It does seem like a bug that the error message is that the domains are different, when the canonical URL is the same as the base URL. Assigning to Konrad to investigate further.

@kdzwinel
Copy link
Collaborator

kdzwinel commented Feb 7, 2018

I did couple of runs using extension, DevTools panel and console and only managed to reproduce it once at the very beginning. The issue was, that the main resource was not identified correctly because main HTML page was returning HTTP 304. Instead, font was identified as a main resource causing canonical audit to fail:

screen shot 2018-02-07 at 15 21 49

Can anyone still reproduce it? @callmenicholi have you, by any chance, changed something on that page in the meantime?

@ghost
Copy link
Author

ghost commented Feb 7, 2018

I have made no changes. It’s in your hands.

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