WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
Changing canonical for front page (1 post)

  1. MarceFX
    Member
    Posted 1 year ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.