ModxHere’s another forum inspired tip based on Google’s, Specify your canonical from esnyder: Canonical URL tag in MODx – SEO trick. This SEOmoz article references the importance of using this SEO technique calling it “The Most Important Advancement in SEO Practices Since Sitemaps“.

As you read down through the post AMDbuilder and Eol suggest PHx driven modifications (see below) which allow you to display a slightly different tag for a home page than for the rest of the interior pages of a site. This is the simplest iteration of the code and is the one I intend to begin implementing:

<link rel="canonical" href="[(site_url)][*id:isnot=`[(site_start)]`:then=`[~[*id*]~]`*]" />

For anyone new to MODx, don’t forget the install PHx for this technique to work!

  • buddyrigotti

    What's wrong with using [*alias*] for the canonical link? That's what I'm doing now, except for my home page which just uses the [(site_url)].

  • http://www.gregorysmart.com Gregory Smart

    Sounds like that would probably work as well.

  • http://www.michael-van-laar.de Michael van Laar

    Do you really need the PHx expression? On michael-van-laar.de I have the canonical metatag filled with “[(site_url)][~[*id*]~]” in the header of every page. And on the home page it displays only the domain without any alias – as it’s supposed to be.

  • http://twitter.com/FreelanceWebDev Joe Molloy

    For Revo use

    [[~[[*id]]? &scheme=`full`]]