DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Canonical link management in DNN

 2 Replies
 2 Subscribed to this topic
 29 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 27
New Around Here

    Hi DNN fellows - 

    I'm trying to appease requests from a new client that is used to managing things a certain way in a non-DNN world. 

    The issue has come up is that the best-practice URL management setting to force all page URLs and HTTP requests to lowercase is messing with the plethora of marketing and tracking codes that they require. I've been adding regex snippets to the "Keep in Query String Parameter" AUM setting, but sometimes the tracking values include mixed case letters. I've been asked what the effect would be of shutting off the "force requests to lowercase" switch, and I'm a little leery of that for SEO reasons. They feel that if each page has an auto-generated canonical links that would be no problem. 

    When I learned about canonical links at one point, I (mis-?) understood that they were only needed when you identified 2 or more pages that had nearly identical content and you wanted to mark one of them as authoritative. I'm puzzled by the "every page has a canonical link" strategy - help! 

    In any case, if that's needed, I did find a resource where that value could be set programatically by code in a DNN module. I assume that could perhaps be set in the database with a SQL statement for all pages as well? Or are there any admin tools for this? Any thoughts?

    Thanks! David

    Growing Member
    Posts: 52
    Growing Member
      The reason you want to have a "every page has a canonical link" strategy is that things can get a bit messy. Actually not so much for SEO purposes as Google understand that /YourAwesomeArticle is the same as /yourawesomearticle. But if you do reporting in Google Analytics or Piwik, it is annoying that the 2 articles are not being added up.
      So, when does that happen? Most of the time backlinks.

      Forcing urls to lowercase is a nifty setting but it should not be applied to urls with a GUID or a hash or anything generated. In DNN you can exclude pages from being decapitalized (is that a word?) in the Expressions tab. As not everyone is working with regex on a daily base, you can learn more about that on https://regex101.com/ and 1 tab next to the expressions tab you can also test your urls.

      Hope this helps.
      New Around Here
      Posts: 27
      New Around Here

        Hi Tycho, Thanks for the explanation - it sounds like a big topic - like there may be additional considerations. :)  I would be happy to simply shut off the "force to lowercase" setting altogether, but as you noted, it may cause issues with Analytics, even if Google generally realizes that two variants of the URL are the same page for Search Results. I did do a test and noted that, with the "all-lowercase" option shut off, mixed case URLs still reach the intended page that was defined with an all-lowercase URL; I was afraid it would just be a 404 or go to the previous level page as DNN does.

        • What would seem to me to be really slick is if there was a way to allow mixed case to be allowed in the portion of the URL past the actual page path, so that query string parameters could be mixed, but force lowercase for the rest. The option now by building a regex expression for "
        • I found an article by Bruce Chapman telling about a base page property for CanonicalLinkUrl -  https://www.dnnsoftware.c...icallinkurl-property - but it only seems to be available to set programmatically through a DNN module. If I could set it in SQL based on the page URL minus any query string parameters, that might be a way to go. Or it might create even bigger problems! :)
        • I've also seen it mentioned that setting the site alias mode to "Canonical" instead of "Redirect" should add a link to every page - but that it would just mirror whatever URL got to the page at that moment.
        • I may just add the tracking code regex (for hubspot tracking codes in the Keep in QueryString setting, I used: "|(/hsa_[^/]+/[^/]+)+". to prevent any URL with hubspot tracking codes in it to preserve mixed case. I'm thinking that may have about the same effect as shutting off the global option, though.

        Thanks again for the input! Still trying to wrap my head around what the best option is here.

        PS - Here's a sample URL: https://unitedtraining.co..._ver=3&gclid=Test123

        David
        -Colorado

        These Forums are dedicated to the discussion of DNN Platform.

        For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

        1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
        2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
        3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
        4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
        5. No Flaming or Trolling.
        6. No Profanity, Racism, or Prejudice.
        7. Site Moderators have the final word on approving / removing a thread or post or comment.
        8. English language posting only, please.

        Would you like to help us?

        Awesome! Simply post in the forums using the link below and we'll get you started.

        Get Involved