How To Remove Shortlink From HTTP Header WordPress
Do you want to Remove Shortlink From HTTP Header of your website . As we know that WordPress 4.2 and above version added rel=’shortlink’ in the HTTP header Response .
What is shortlink in Http header ?
Shortlink is nothing but the shorter version of the post or page url . Which create a separate request on respective web-page . So its better you should remove it . Mostly WordPress added this by considering the SEO factor .
For example this page has following shortlink but you can’t search because we have already disabled this option
<link rel='shortlink' href='https://gomahamaya.com/?p=2047' />
In the above ?p=ID
respresent the page ID with the number . Removing Shortlink From HTTP Header of your website will not affect your website seo but it will increase your website performance little bit .
To remove rel=shortlink from your website you need to paste the following code inside function.php file . This is without plugin method .
remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
If you want to do same work by using plugin then you should use Remove WP version and shortlink plugin . This is free plugin but if you want premium version then you should use perfmatters . Which have so many feature apart from this
Once you activate the plugin just enable Remove Shortlink option in perfmatters Plugin and you are ready to rock .