Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Canonical URL Issue

Started by MobileCS, November 14, 2023, 11:37:28 AM

Previous topic - Next topic


I just noticed in Google search console that I have 2,500 (and climbing) URL's with "Alternate page with proper canonical tag" issues.

I'm seeing a weird issue concerning that. I have search engine friendly URL's turned on (it's been on for 15+ years, so I can't turn it off for SEO sake).

My URL is :,61952.0.html

If I am logged in, the canonical tag shows the same as above.

If I'm not logged in, the canonical tag shows as :

Any idea why this is - and how I can fix it?


I'm not sure if it's the right way to fix it, but to stop the bleeding this seems to be working :

In Sources/Display.php :

$context['canonical_url'] = $scripturl . '?topic=' . $topic . '.' . ($can_show_all ? '0;all' : $context['start']);

$context['canonical_url'] = $scripturl . '/topic,' . $topic . '.' . ($can_show_all ? '0/all.html' : $context['start'] . '.html');