-
Notifications
You must be signed in to change notification settings - Fork 503
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
Canoncial URL should use Url::current() instead of Url::full() #180
Comments
Indeed, the current use of Url::full() bring no benefit for SEO since it will just use the full URL and generate a lot of duplicate content. Expected behaviour (current page => canonical URL): https://example.com?utm_source=email => https://example.com This is the best default behavior because all important parameters for SEO should preferably use URL rewriting (so compatible with Url::current()) |
XSS #247 |
I totally agree that using Url::full() has no benefit for SEO. It's worth mentioning that the config file is inconsistent in the current situation:
Based on the config file both opengraph url and canonical should use Url::current() but in fact, only opengraph url does it. So using the same config for opengraph url and canonical we will receive e.g. |
Fixed on #255 |
When setting the config option
meta.defaults.canonical
tonull
, the canonical URL will be set from the value ofUrl::full()
instead ofUrl::current()
.Url::full()
includes query parameters and the canonical URL is usually used to strip away query parameters like UTM tags, search parameters, and so on.I mean, what's even the point of specifying a canonical URL from the full URL? That's exactly the same result as not setting a canonical URL at all.
The text was updated successfully, but these errors were encountered: