Support » Plugin: Yoast SEO » Changing canonical for front page

  • Hi,

    I’m running SSL on a site. So, this plugin adds the rel=”canonical” href=”https://example.com”.

    What I want is to have rel=”canonical” href=”http://site.com”, since I don’t want Google to worry about my https. So far, I “customized” it changing this line on class-frontend.php:

    else if ( is_front_page() ) {
      $canonical = home_url( '/' );

    To:

    else if ( is_front_page() ) {
      $canonical = "http://site.com";

    I guess that works, but I think a better frontend option could be added to the plugin.

    Thanks

    http://wordpress.org/extend/plugins/wordpress-seo/

  • The topic ‘Changing canonical for front page’ is closed to new replies.