• I set the canonical URL of a HTTPS website to a HTTP website with different domain
    However, how many times I tried, The HTTPS website keep showing canonical URL to HTTPS

    Example:
    <link rel="canonical" href="http://123.123.123.123" />

    in browser : <link rel="canonical" href="https://123.123.123.123" />

    How can It stays HTTP instead of HTTPS

    • This topic was modified 2 years, 5 months ago by Barracuda.
    • This topic was modified 2 years, 5 months ago by Barracuda.
Viewing 4 replies - 1 through 4 (of 4 total)
  • I set the canonical URL of a HTTPS website to a HTTP website

    How did you do this?

    On a WordPress site, canonical is automatically set to the page’s permalink by WordPress when wp_head() is called, unless overridden by a theme or plugin.

    And the URL scheme used is whatever is set in your SETTINGS => GENERAL (under “WordPress Address” & “Site Address”).

    Thread Starter Barracuda

    (@bluemels)

    SORRY. I forgot to mention. The canonical url is different domain.

    I set the custom canonical using Snippet plugin

    If I understand you correctly, you’re using a custom PHP code snippet to override WordPress’ auto-generated canonical and insert your own?

    If so, can you share the code snippet you’re using?

    Thread Starter Barracuda

    (@bluemels)

    this add custom canonical url

    add_action('wp_head', 'cano_ip');
    function cano_ip(){
    ?>
    <link rel="canonical" href="http://123.123.123.123" />
    <?php
    }
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Canonical URL HTTPS to HTTP’ is closed to new replies.