In the SEF plugin, set "enforce URLS without trailing slash" and inspect the homepage and a sub page (example.com and example.com/page1). Notice that the canonical is correct for example.com/page1 but example.com has a canonical with a trailing slash.
Canonical follows the URL without trailing slash.
URLs follow the correct non trailing slash while the canonical for the homepage contains the trailing slash.
Joomla 5.1
I am happy to say that I've successfully updated to Joomla 5.1 on my website. I can see from the release notes that there are some SEO items for the SEF plugin that have been added.
https://www.joomla.org/announcements/re ... -here.html
Specifically this one about the trailing slash.
#42702
This works great! However, I am noticing a strange issue with the homepage canonical now. It is still generating a URL to have a trailing slash even though all of the URLs are supposed to not have the trailing slash. For example. If in the SEF plugin you set "enforce URLS without trailing slash" that works for the URLs in subfolders, but not for the domain. So in the browser you will see https://example.com but for the canonical you will see "https://example.com"
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Hi rfmjoe,
Thank you for your response. The plugin actually does have this feature. When you access this plugin, place your domain in the "Site Domain" field (without the trailing slash) and you'll see that your pages now generate a canonical tag in the HTML.
Thank you,
Geoffrey
@Geoffresh You are right that the setting exists. But it doesn't mean a cannonical URL functionality like it is e.g. provided by some 3rd party SEO extensions, it means only a cannonical domain, i.e. if the site can be reached with different domains, the configured domain is used for the cannonical URL, but the rest of the current URL is just the current URL.
This was discussed here many times, see e.g. this comment here: #9785 (comment) .
This just for clarification and your understanding.
Don't get me wrong: I don't say that your issue is expected behavior.
If it is really like you write that you got redirected to the right URL without trailing slash but the cannonical tag still points to the URL with trailing slash, then this isa bug, I think. But I'm not an expert on our routing or the SEF plugin, so I might be wrong.
Out of curiosity, is this something that the Joomla core team will work on? Is there a process to submit this for consideration? I'm just not sure what the next steps would be to advocate for this.
Thank you
Wait until someone makes a pull request for it, or if you have an idea how to solve it make a pull request yourself.
I don't say that your issue is expected behavior.
yes, no one expects this plugin to work like this, which means this @joomla plugin is not working properly.
rel=“canonical”
should never point to non-canonical references.
a canonical domain does not exist at all in @google definitions, but a canonical link does exist
(for example, if you have 2 domains, then there is only one canonical link
on one domain, and not several on one domain
, as this plugin currently generates)
I also recently talked about the problem with this plugin #42720
and I suggested making a global SEF setting for this plugin #43331
So, the way you are using this feature, it is actually very counterproductive. I would strongly suggest to disable the "canonical" option again. As was described, this is to define a canonical domain, but it will definitely NOT create a canonical URL. If your site needs canonical URLs because you have the same content available via different URLs, this will mean that each of those differing URLs with the same content will have their current URL as canonical Tag set. That makes this absolutely useless and actually makes Google ignore the canonical tag and in worst case penalize you.
Looking at this, my position would be, that this is a wontfix, since the slash after the domain never creates a duplicate content.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-08-19 13:57:41 |
Closed_By | ⇒ | Hackwar |
Sicne there was no response in the last 2 weeks and for the reasons stated above, I'm closing this issue. If you feel this is not correct, please respond here and we can see if we reopen this ticket or if we need a new ticket.
as far as i know, joomla core hat no "canonical" link feature built in. So this might rely to the plugin/component you are using maype?