Forum Moderators: goodroi

Message Too Old, No Replies

Canonical of Site Root

Lighthouse Error?

         

IanTurner

10:14 am on Nov 7, 2018 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Lighthouse reports canonical of site root as being invalid, why is this the case and is it incorrect?

I would have thought that any page that is the same as the site root should have that in its canonical tag.

e.g.
example.com/
example.com/index.html
example.com/indextest.html
example.com/index.html#17
example.com/index.html?login=y

All have the same content, so as far as I understand the canonical should be example.com/ as that is what shows in search engines.

justpassing

10:26 am on Nov 7, 2018 (gmt 0)

5+ Year Member Top Contributors Of The Month



It might be related to this :


Don't point pages to the site's root page, unless their content is the same. This may be valid in some cases, such as for AMP or mobile page variations, but nonetheless Lighthouse treats this scenario as a failure.

[developers.google.com...]


I think you shouldn't worry about this error.

phranque

10:32 am on Nov 7, 2018 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



any request for a url containing a directory index document should be (301) redirected to the root of the requested directory.

justpassing

10:43 am on Nov 7, 2018 (gmt 0)

5+ Year Member Top Contributors Of The Month



Indeed.

lucy24

5:45 pm on Nov 7, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



All have the same content
This wording makes me uneasy, because it implies that more than one of the five listed URLs is reachable as-is. That's a bigger problem than rel="canonical".

IanTurner

8:49 am on Nov 10, 2018 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



In my case often the pages are multivariate testing pages. So are just temporarily available as separate pages and redirect at other times hence the canonical.

Thank you justpassing and phranque that puts my mind at rest.