We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22303 MODX Staff
    • 10,725 Posts
    This thread has me thoroughly confused. If you use FURLs, you should already have canonical URLs. If you have created your site improperly and placed non-FURL links in your content, I can see where this might be an issue for you, but in general, no modification is required in MODx to do this. It’s up to you to make sure you build the links to the canonical FURLs properly, though link tags like [~123~] as well as $modx->makeUrl(123) API calls already do this for you. In Revolution, this is even stricter, as you cannot access the pages in the variety of ways you can in current releases. AFAIK, this is a complete non-issue.
      • 3647
      • 177 Posts
      Thanks OpenGeek, you always make me feel an idiot, and before you say it - that’s maybe because I am one...

      The issue I thought was that unless you add the SEO strict, then even if you use FURL’s there are 2 ways of reaching a page,
      So, for example you could reach a page with
      http://modxcms.com/index.php?id=23
      or
      http://modxcms.com/about/blog/jcoward/

      Therfore, even if you you try and make sure you have an alias on each page, would it not be a good idea to try and cover the possibility of making a mistake on a large site and missng one by adding the canconical as a way of closing the loophole?

      If this is a non issue then I am greatly relived, sorry if I wasted your time

      Mark
        • 22303 MODX Staff
        • 10,725 Posts
        Well, now I have to use the rel="canonical" trick, cause you published a link to the non-canonical form of my blog URL. tongue
          • 36451
          • 264 Posts
          Yes, but...

          the startpage links should always go to "/", not "home.html" or "index.php?1", because of Googles duplicate content issue. So I can’t use "[~[(site_start)]~]" or the breadcrumb snippet "Home" crumb: It will never point to "/" but "mysite.com/home.html" ...

          My canonical tag snippet is
          <?php
          if ($modx->documentIdentifier != $this->config['site_start']) {
            $output = '<link rel="canonical" href="'.$modx->makeUrl($modx->documentIdentifier,"", "", "full").'" />';
          }
          else {
            $output = '<link rel="canonical" href="'.$this->config['site_url'].'" />';
          }
          return($output);
          ?>

            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: yoomai at May 10, 2009, 09:44 AM

            the startpage links should always go to "/", not "home.html" or "index.php?1", because of Googles duplicate content issue. So I can’t use "[~[(site_start)]~]" or the breadcrumb snippet "Home" crumb: It will never point to "/" but "mysite.com/home.html" ...
            Yoomai, you are absolutely correct, and why MODx Revolution 2.0 features much more strict URL generation/access, including returning base_url when the site_start page id is processed by the makeUrl() function. This can and probably should be fixed in MODx 1.0 Evolution as well, though I assumed the SEO Strict plugin would have taken care of that problem by correcting links to the site_start page in the output.