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 229 posts 597 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 554 posts 2119 karma points
    Jun 16, 2023 @ 15:27
    Yakov Lebski
    100
    Model.Url(mode: UrlMode.Absolute)
    
  • Darren Wilson 229 posts 597 karma points
    Jul 05, 2023 @ 12:12
    Darren Wilson
    0

    Thanks so much - sorry for the delay!

Please Sign in or register to post replies

Write your reply to:

Draft