Tag: rel canonical bug (4 posts)

  1. comp411
    Posted 6 years ago #

    It seems that the rel canonical tag added to wordpress 2.9 does not mark the correct homepage as the preferred page when using the static page under Settings > Reading in the admin control panel is set. Below is a example:

    http://www.example.com get marks with rel="canonical"
    http://www.example.com/ does not and wordpress automatically makes the home page end with the slash /

    How to mark the "http://www.example.com/" version with
    <link rel='canonical' href='http://www.example.com/' />
    the default seems incorrect. below is how the default points to the Non slash version instead
    <link rel='canonical' href='http://www.example.com' />

  2. game writer
    Posted 6 years ago #


  3. Pedro Gomes
    Posted 6 years ago #

    Same problem here.

    http://www.example.com/ has it's canonical page as http://www.example.com

    Which will probably cause a loop to a crawler when it visits the homepage. (http://www.example.com redirects to http://www.example.com/)

    I tried solving this by adding a trailing slash on the General Settings Page to the URL fields but after saving it always removes the trailing slash.

  4. Pedro Gomes
    Posted 6 years ago #

    I worked around this problem which appeared after I upgraded to 2.9.1:

    1- I Removed add_action( 'wp_head', 'rel_canonical' ); from wp-includes/default-filters.php in line 185.

    2- Reactivated Yoast's Canonical URL's Plugin that I had previously installed.

    Note: It seems that this problem happens in blogs that have a static page set as homepage.

    I do hope a fix comes soon.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.