This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Bobby 3 weeks, 1 day ago.

Assigned support staff: Bobby.

Author Posts
September 24, 2019 at 11:55 am

michaelD-58

I am trying to:

use Custom Permalinks with WPML

Link to a page where the issue can be seen:

hidden link

I expected to see:

<link rel="canonical" href="hidden link" />

Instead, I got:

<link rel="canonical" href="hidden link" />

In the WP I've granted you access to, the double backslash will be after the IP, the problem only exist on Spanish pages

<link rel="canonical" href="hidden link" />

September 24, 2019 at 5:43 pm #4633295

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hello,

as a test what are your results if you disable the Custom Permalinks plugin ?

September 25, 2019 at 12:50 am #4634607

michaelD-58

If I disable Custom Permalinks the canonical information disappears completely from the header

This is the original URL without Custom Permalinks
hidden link

This is the URL I want to have, it's a bit different and without the parent slug
hidden link

but I get this as a canonical when I edit it with Custom Permalinks
<link rel="canonical" href="hidden link" />

September 25, 2019 at 12:28 pm #4638733

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

I was able to trace this issue to the Yoast SEO plugin.

When WPML + Custom Permalinks + Yoast SEO are enabled the canonical URL is presented with the trailing slash(//).

Once Yoast SEO is disabled the issue is resolved.

This seems to be an issue that was fixed by the Custom Permalinks team in their 1.3 version if possible please contact the Custom Permalinks team and let me know their feedback.

Custom Permalinks Changelog:
=> https://wordpress.org/plugins/custom-permalinks/#developers

Possible Workaround:

1. Go to pages->edit your page
2. Under Yoast Seo -> Advanced -> Canonical URL
3. Fill in the correct URL without the trailing slash

[review screenshot]

If you examine the source now you should be able to see the correct canonical URL.

The topic ‘[Closed] Double slash in the canonical address’ is closed to new replies.