No Code Attached Yet
avatar Geoffresh
Geoffresh
17 Apr 2024

Steps to reproduce the issue

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.

Expected result

Canonical follows the URL without trailing slash.

Actual result

URLs follow the correct non trailing slash while the canonical for the homepage contains the trailing slash.

System information (as much as possible)

Joomla 5.1

Additional comments

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"

avatar Geoffresh Geoffresh - open - 17 Apr 2024
avatar Geoffresh Geoffresh - change - 17 Apr 2024
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 17 Apr 2024
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Apr 2024
avatar rfmjoe
rfmjoe - comment - 17 Apr 2024

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?

avatar Geoffresh
Geoffresh - comment - 17 Apr 2024

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


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43294.

avatar richard67
richard67 - comment - 18 Apr 2024

@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.

avatar Geoffresh
Geoffresh - comment - 18 Apr 2024

Hi Richard,

Thank you for your response. Yes, this is like I describe so it must be a bug. Please see the attached screenshot.
Screenshot 2024-04-18 at 8 04 23 AM

avatar Geoffresh
Geoffresh - comment - 29 Apr 2024

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

avatar richard67
richard67 - comment - 29 Apr 2024

Wait until someone makes a pull request for it, or if you have an idea how to solve it make a pull request yourself.

avatar universewrld
universewrld - comment - 30 Apr 2024

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

avatar Hackwar
Hackwar - comment - 5 Aug 2024

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.

avatar Hackwar Hackwar - change - 19 Aug 2024
Status New Closed
Closed_Date 0000-00-00 00:00:00 2024-08-19 13:57:41
Closed_By Hackwar
avatar Hackwar Hackwar - close - 19 Aug 2024
avatar Hackwar
Hackwar - comment - 19 Aug 2024

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.

Add a Comment

Login with GitHub to post a comment