How to remove Shortlink in WordPress?

By default, the following tag shows up in every WordPress install.

<link rel='shortlink' href='https://domain.com?p=123' />

This is used for a shortlink to your pages and posts. However, if you are already using pretty permalinks, such as domain.com/post, then there is no reason to keep this, it is just unnecessary code.

You can easily remove this in the Perform plugin by enabling the “Remove Shortlink” option.

This also removes the rel=shortlink HTTP response header associated with it.