Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1305479

    i know there are plugins that’ll let us add custom or automatic Canonical links in the head of our pages. i was about to do something like that when i noticed my pages already have Canonical links in the head…

    <meta name="generator" content="WordPress 5.7.2" />
    <link rel="canonical" href="" />
    <link rel='shortlink' href='' />

    so i’m curious to know where this is coming from. does anyone know?


    Hey SyberKnight,

    Thank you for the inquiry.

    It is automatically added by WordPress in the head tag using the wp_head hook and with the following function as the callback.


    If you want to remove it, just add this code in the functions.php file.

    remove_action( 'wp_head', 'rel_canonical' );

    Best regards,

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.