Do WordPress ?p=123 shortlinks cause duplicate content?
No. When pretty permalinks are on, WordPress answers /?p=123 with a 301 redirect to the post's real address, so the short form never shows content and cannot be indexed as a copy. The rel="shortlink" tag in your page source only advertises that redirecting address.
What the shortlink is
Every post has a numeric ID, and WordPress can always find a post from it. For each public post type, core therefore offers a short address made of your home URL and that ID, and announces it in two places on the post:
<link rel='shortlink' href='https://example.com/?p=123' />
and an HTTP response header:
Link: <https://example.com/?p=123>; rel=shortlink
It dates from the years when links had to fit in short messages. For the page set as a static front page, the shortlink is just the home URL.
Nothing in Google's documentation lists rel="shortlink" as something it uses, so we treat the tag as information for apps, not for search engines. It does not ask anyone to index the short address.
Why it is not a duplicate
A duplicate needs two addresses that both return the content. Request /?p=123 on a site with pretty permalinks and you get:
HTTP/1.1 301 Moved Permanently
Location: https://example.com/espresso-grind-size/
That redirect is core's canonical redirect at work. It handles the sibling forms as well: /?page_id=45 goes to the page's permalink and /?attachment_id=67 to the attachment's address. A crawler that follows a shortlink lands on the one real URL, and the redirect passes it there cleanly.
You can confirm it in a terminal:
curl -sI "https://example.com/?p=123" | grep -iE "^(HTTP|location)"
If Search Console lists a few ?p= addresses under "Page with redirect", that is the correct, harmless state for them. Our guide to that status explains when it needs attention, which here it does not.
The case where ?p= is the real URL
On a site set to Plain under Settings → Permalinks, there is no pretty address to redirect to. /?p=123 is the permalink, it returns 200, and that is what gets indexed. There is still no duplication, because only one form exists, but you give up readable URLs and several core conveniences that only run with pretty permalinks. Unless the server cannot rewrite URLs at all, switch to Post name.
A site that later moves from Plain to a pretty structure does not need hand-made redirects for its old ?p= addresses, for the reason above: core redirects them.
Internal links that use ?p=
The one way shortlinks cost you anything is when your own site links to them. That happens when:
- a link was pasted from the editor's preview or from an old "Get Shortlink" button;
- a theme or plugin builds links from IDs;
- content was imported with ID-based links intact.
Each such link works, but through a redirect, which is slower for visitors and a wasted request for crawlers. Find them by searching your content for ?p= and ?page_id=, and replace each with the permalink.
Should you remove the shortlink tag?
It is a tidiness choice with no ranking effect either way. Removing it trims one line from the head and one response header on every post.
- Keep it if you or your readers share posts by their short address, or a publishing tool reads it.
- Remove it if nothing uses it. In Hydrogen SEO that is the Remove shortlinks switch under Crawl cleanup, which removes both the tag and the header.
Removing the tag does not disable the redirect. /?p=123 keeps resolving to the post, so old short links in the wild continue to work.
Common questions
Does the shortlink change if I change the slug?
No. It is built from the post ID, which never changes, so it keeps pointing at the post whatever its slug or permalink structure becomes.
Why does Search Console show ?p= URLs at all?
Because something linked to them, on your site or elsewhere. Google reports them as redirects and indexes only the destination.
Is a shortlink the same as a URL shortener link?
No. It lives on your own domain and redirects with a 301 inside WordPress, with no third-party service involved.