• Resolved blogoguru

    (@blogoguru)


    hi!
    can anybody explain me what is the purpose of link rel=’shortlink’
    my permalink format is
    https://blogoguru.net/archives/627
    and to eliminate WordPress infinitive duplicate content I’m already using different means including rel=’canonical’. But I think that using rel=’shortlink’ makes the things just more difficult.
    So what is the purpose of using rel=’shortlink’ and guiding search engine robot to page like /?p=627 even there is no such a page?
    thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • A shortlink is just a way to provide a shorter version of the URL of any page, in case you want to share the URL but you need it to be as short as possible.

    For example, if a page URL is https://www.mysite.com/something/this-post-is-very-awesome-because-its-cool, then the shortlink could be (automatically) generated into something like https://wp.me/p5IhCV (just an example).

    That URL is much shorter (but will lead to the same page as the long URL), and so can be used when you want to share the URL on something like Twitter, where the number of characters is limited.

    So whenever you would share a page, some services (Facebook, Twitter, etc.) check if there’s a shortlink in the source code, and will then use that URL in the post instead of the longer, original one.

    Thread Starter blogoguru

    (@blogoguru)

    hi!
    so from what you are saying rel=’shortlink’ just for user (as reminder?) and not search engine robot?
    if that is the case I believe I can just get rid of rel=’shortlink’. Quite obvious if there will be such a need (short url) I could share page using /?p=post-id anyway
    Honestly I do not think there is any need for rel=’shortlink’ to be on every page of my website

    It’s not just for a user, actually.

    Let’s say you would share the URL on Twitter. You type the long URL in your tweet. Then Twitter will do a quick visit of the page and check if there’s a shortlink, and then display that short URL in the Tweet.

    So you might type this:

    Hey everyone, check out this super duper awesome page, I highly recommend it! https://www.mysite.com/something/this-post-is-very-awesome-because-its-cool

    Way too long for a tweet. Won’t fit, cause you only have 140 characters available. But Twitter will then actually display it like this, which WILL fit:

    Hey everyone, check out this super duper awesome page, I highly recommend it! https://wp.me/p5IhCV

    Note: this is not 100% technically correct, it is just to show you how you can benefit from having a shortlink. You can remove it if you like, but it doesn’t do any damage, so why not just keep it in?

    Thread Starter blogoguru

    (@blogoguru)

    hi!
    Even if it does not do any damage in my case I find it just useless. I believe in my case https://blogoguru.net/archives/627 url is short enough.
    Thanks for your answers

    You should remove it if you don’t want to confuse Search engine Bots.

    You can do it manually by adding this to your functions.php

    remove_action( ‘wp_head’, ‘wp_shortlink_wp_head’, 10, 0 );
    remove_action( ‘template_redirect’, ‘wp_shortlink_header’, 11, 0 );
    remove_action( ‘wp_head’, ‘wlwmanifest_link’ );

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘link rel='shortlink’ is closed to new replies.