Try our conversational search powered by Generative AI!

Canonical Tags - Not Showing Full URL Path

Vote:
 

HI,

I am trying to add a canonical tag into our site EPiServer CMS 9 with Azure Cloud for all pages as below -

How ever when I add the tag on my page and view the source it only shows the relative path. So if the above tag is added on the page having url -  www.mysite.com/page1 - it will appear as

In same way for Start page for example it appears as  instead of 

When I tried to run the application on localhost and debug it, it showed the full path on page source, but on deploying it in environment, it shows relative path.

David was also facing same issues in his post - "Canonical Tags - Full Path Required"

Could anyone has solution for this?

help is much appreciated.

Regards,

Sanket Mahimkar

#145632
Mar 08, 2016 15:49
Vote:
 

Hi,

Who is David, and which post?

This behavior is by design. The domain is omitted when it's matching the current request's. Please read the first comment on this post http://dodavinkeln.se/post/how-to-get-the-external-url-to-content.

There's nothing wrong with this though, your canonical element is working as intended. But I do agree with you that the domain shuld be returned as well.

#145642
Mar 08, 2016 18:36
Vote:
 

If you change the site's url in admin to localhost, the domain will get omitted locally as well.

#145643
Mar 08, 2016 18:38
Vote:
 

If you change the site's url in admin to localhost, the domain will get omitted locally as well.

#145644
Mar 08, 2016 18:40
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.