Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Darren Wilson 238 posts 646 karma points
    Jun 16, 2023 @ 14:21
    Darren Wilson
    0

    Trying to create a canonical URL in Umbraco 10.

    I'm using this on an Umbraco 7 website

    @{
        var canonicalUrl = Model.UrlWithDomain();
    }
    
    <link rel="canonical" href="@canonicalUrl" itemprop="url" />
    

    But this doesn't work in Umbraco 10 - any ideas how I do this?

    Thanks Darren

  • Yakov Lebski 594 posts 2350 karma points
    Jun 16, 2023 @ 15:27
    Yakov Lebski
    100
    Model.Url(mode: UrlMode.Absolute)
    
  • Darren Wilson 238 posts 646 karma points
    Jul 05, 2023 @ 12:12
    Darren Wilson
    0

    Thanks so much - sorry for the delay!

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies