Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.13
-
Fix Version/s: 4.7.18
-
Component/s: WordPress Integration
-
Labels:
-
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.