Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19665

Canonical URL for WP basepage pages is the basepage itself

    Details

    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      The canonical link element helps search engines and social media platforms know which URLs are minor variations of each other as opposed to distinct pages. WordPress puts together a canonical URL using the post's permalink.

      When using basepage URLs (as opposed to shortcodes), all CiviCRM pages use the same basepage, and WordPress includes the same canonical URL. Besides being terrible for SEO (event 2 is considered to be the same page as contribution page 1), it also means that sharing basepage-based CiviCRM pages on social media is ugly.

      This is a really big problem for PCPs, since there is no shortcode support for them (and anyway, you might not have the time to manually set up pages with shortcodes for each personal campaign page).

      WordPress 4.6.0 added a new filter for setting the canonical URL, and the popular Yoast WordPress SEO plugin has a filter for doing the same. We should post the canonical URLs to include all the parameters.

        Attachments

          Activity

            People

            • Assignee:
              andrewhunt Andrew Hunt
              Reporter:
              andrewhunt Andrew Hunt
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: