If you have WPML Plugin and your hreflang link is like :

https://w3site.ca/en/”>

https://w3site.ca/”>

it means $url variable, has trimmed and the slash has removed from end of that, so you can fix it just for wmpl url by adding following code to file functions.php in your theme :

Copy to Clipboard