WordPress.org

Ready to get started?Download WordPress

Forums

Absolute-to-Relative URLs
[resolved] Plugin destroys canonical-tag (2 posts)

  1. gerobe
    Member
    Posted 1 year ago #

    The plugin also tries to shorten the canonical tag (e.g. inserted with plugins like WP SEO), which results in a wrong canonical syntax.

    Without "Absolute-to-Relative URLs" the tag looks like

    <link rel="canonical" href="http://www.nameofwebsite.com/post_slug/" />

    when enabling the plugin and also the plugin wp-minify this tag is destroyed into

    <link rel="canonical" href="./" />

    http://wordpress.org/extend/plugins/absolute-to-relative-urls/

  2. Steven Vachon
    Member
    Plugin Author

    Posted 1 year ago #

    This is more an issue for WP-HTML-Compression, but anyway..

    Canonical URLs can be relative:
    http://support.google.com/webmasters/bin/answer.py?hl=en&answer=139394
    (scroll down a bit, or do a search for "relative")

    But, yes, they do recommend making them absolute to avoid "difficulties". So, I'll add this to the next version of WP-HTML-Compression.

    Thank you

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags