Check your post’s source code. You’ll find a tag like this:
<link rel='shortlink' href='https://yoursite.com/?p=42' />
That’s a WordPress shortlink — an abbreviated URL using the post ID instead of your pretty permalink. WordPress adds it to the of every post and also sends it as an HTTP header.
The idea was that shorter URLs would be easier to share on platforms with character limits (remember when Twitter had 140 characters?). In practice, nobody shares WordPress shortlinks. People share the actual URL, and URL shorteners like Bitly handle the rest if needed.
What are WordPress shortlinks?
Every WordPress post has two URLs: the permalink (yoursite.com/my-great-post/) and the shortlink (yoursite.com/?p=42). The shortlink uses the post ID as a query parameter, making it short but ugly.
WordPress adds the shortlink in two places: a tag in HTML , and a Link HTTP response header. Both are discoverable by applications and bots.
Why should you care?
They expose post IDs. The shortlink reveals your post’s numeric ID, which can be used for enumeration — cycling through IDs to discover content or map your site structure.
Nobody uses them. Social media platforms no longer have character limits tight enough to make shortlinks necessary. And WordPress’s shortlinks aren’t even that short — they include your full domain name.
Duplicate URL signals. Having two URLs for the same content can (in theory) confuse search engines. Your canonical tag handles this, but cleaner is always better.
The quick fix
// Remove shortlink from head and HTTP headers
remove_action( 'wp_head', 'wp_shortlink_wp_head', 10 );
remove_action( 'template_redirect', 'wp_shortlink_header', 11 );
The one-click solution
OvKit includes Remove Shortlink under Features → Cleanup. One toggle.
What happens after you fix this?
- Shortlink tag removed from HTML head
- Shortlink HTTP header removed from responses
- Post IDs no longer exposed via shortlinks
- Actual shortlinks still resolve — the
?p=42URL still works if someone uses it directly
FAQ
### Will removing shortlinks break anything?
No. The shortlink is informational only. Your posts’ actual permalinks are unaffected. If someone already shared a shortlink URL, it still resolves to the correct post because WordPress handles ?p= queries internally regardless of the tag.
### Does Jetpack use WordPress shortlinks?
Jetpack has its own shortlink system (wp.me links) that’s separate from the default WordPress shortlinks. Disabling the default shortlinks doesn’t affect Jetpack’s short URLs.
### Should I remove this together with other head cleanup items?
Yes. Removing shortlinks, RSD, WLW manifest, REST API links, and generator tags together creates a significantly cleaner section. OvKit handles all of these as individual toggles.
Related reads: