# Change your short link prefix

Enter a new short link prefix. Addresses with the old prefix keep opening their links, so you can update the links you control at your own pace.
Page: https://docs.linkmanagerpro.com/tutorials/change-link-prefix
Use when someone asks: change short link prefix; change /go/ prefix wordpress; change link base without breaking links
Intent: How-to

To change your short link prefix, enter a new one under Link Manager › Settings › General and save. Every short link moves to the new address at once, and addresses with the old prefix keep opening their links. Update the links you control, because it's cleaner and avoids clashes.

The prefix is the path between your domain and the slug: `link` in `yoursite.com/link/spring-sale`. Changing it to `out` makes that link `yoursite.com/out/spring-sale`. Nothing about the link itself changes: same slug, same destination, same clicks.

## Before you start

- You need to be an administrator. Settings stay with administrators, even when editors may use Link Manager Pro ([Access for editors](https://docs.linkmanagerpro.com/guides/access)).
- Pick the new prefix. Use lowercase letters, numbers and hyphens, like `out` or `my-deals`. Capital letters and slashes around it are dropped. A prefix with other characters, like `My Deals`, is refused with a message under the field. The **Short link prefix** and **Internal link prefix** can't be empty, and no prefix may be a WordPress path like `page`.
- Pick a prefix no section of your site uses. Short links answer first: with the prefix `shop`, `/shop/spring-sale` opens the short link `spring-sale`, even if a page lives at that address.
- Want `/go/` addresses? You may not need a change. With the default **Internal link prefix** `go`, `yoursite.com/go/spring-sale` already opens every short link, so you can share it without changing anything. Those addresses then depend on the **Internal link prefix** staying `go` ([General settings](https://docs.linkmanagerpro.com/guides/settings/general#get-more-out-of-it)).

## What happens to links you already shared?

Links you already shared keep opening their short links after you save the new prefix. That covers every address with the old prefix: in posts, emails, social posts, PDFs and printed QR codes. Your slugs, destinations, clicks and reports stay as they are. Only the address in front of the slug changes.

| When | New prefix (`/out/spring-sale`) | Old prefix (`/link/spring-sale`) |
|---|---|---|
| For 90 days after you save | Opens every short link | Opens every short link, even where a page of your site uses that address |
| After the 90 days | Opens every short link | Opens its short link only where WordPress has nothing at that address and the link is live |
| After five more prefix changes | Opens every short link | Stops opening. WordPress answers instead, usually with your 404 page |

- The 90 days count from the save that replaced the old prefix. Link Manager Pro shows no countdown, so note the date.
- After the 90 days, a page, post or redirect you create at the same address wins. The link also stays closed while it's scheduled or expired.
- Link Manager Pro remembers the last 5 prefixes you replaced, each with its own 90 days. A sixth change drops the oldest, and only then do its addresses stop opening.
- Changing back to an old prefix makes its addresses work again, with no time limit. The prefix you leave gets its own 90 days.
- Other addresses on a link, like `/recommends/deal` from an import, don't use a prefix. They keep working as before, unless the new prefix clashes with one ([see the check below](#how-do-you-check-that-the-new-prefix-works)).
- The **Internal link prefix** and the **Affiliate link prefix** work the same way. An old internal or affiliate prefix keeps opening every short link in the same way, with its own 90 days and its place among the 5 remembered prefixes.

What updates by itself and what doesn't:

- Auto-links from your keywords use the new prefix the next time a page is shown, because they're added at that moment.
- **Copy link**, the QR code and **Download QR** in a link's report use the new prefix.
- Links saved in your post content keep the old prefix until you [update them](#update-the-links-in-your-posts). That includes masked links, short links you inserted from the editor and replaced shortcodes.
- Addresses you shared outside your site keep the old prefix. You can [keep some of them working](#keep-a-printed-or-shared-address-working-after-90-days) whatever you change later.

## Change the prefix without breaking links

You change the prefix on the General tab.

::: warning
Old addresses keep opening. After 90 days, a page or redirect at the same address wins. Update the links you control, and use [**Update links in posts**](#update-the-links-in-your-posts) for the posts.
:::

Link Manager › Settings › General

1. Enter the new prefix in **Short link prefix**, for example `out`.
2. Select **Save changes**. **Settings saved.** appears.
3. Reload the page in your browser. Until you do, the **Short Links** list still shows the old prefix, in its addresses, in **Copy link** and in its QR codes.

The **Internal link prefix** works the same way with **Mask internal links**. Turn it on to show the field, enter the new prefix, turn it off again if it was off, and save.

The **Affiliate link prefix** is optional, so its row can stay empty. [Set an affiliate prefix for the first time](#set-an-affiliate-prefix-for-the-first-time) has its steps.

**Run setup again** at the bottom of the tab changes the prefix too. But it also resets **Keep click data for**, unless you pick your period again ([Run setup again](https://docs.linkmanagerpro.com/guides/settings/general#run-setup-again)). The General tab is the safer way.

## Set an affiliate prefix for the first time

An **Affiliate link prefix**, such as `recommends`, gives short links to your affiliates' domains a path of their own: `yoursite.com/recommends/amazon-deal` instead of `yoursite.com/link/amazon-deal`. Links to your own site keep following **Mask internal links**, and every other link keeps the **Short link prefix**. [General settings](https://docs.linkmanagerpro.com/guides/settings/general#affiliate-link-prefix) has the rules.

Setting it breaks nothing you shared. Every prefix you own opens every short link, so the existing affiliate addresses keep opening, and so do the new ones. Only the address Link Manager Pro builds for those links changes.

Link Manager › Settings › General

1. Enter the prefix in **Affiliate link prefix**, for example `recommends`. Leave out slashes and spaces. A prefix that matches your **Short link prefix** or **Internal link prefix**, or a WordPress path like `page`, is refused with a message under the field.
2. Select **Save changes**. **Settings saved.** appears, and a warning may show under the field if a page or post uses that path.
3. Reload the page in your browser, then open Link Manager › Short Links. Affiliate links now show the new prefix.

Changing the affiliate prefix later works like the other two: the one you replace keeps opening links for 90 days. Clearing it makes affiliate links use the **Short link prefix** again.

Links already saved in posts keep their address. To move them, select **Update links in posts** under the **Affiliate link prefix** field. It's disabled until you save. The window is titled **Update affiliate links in posts**, and it works like steps 2 to 8 in the next section. The notice **Links in your posts still use a previous prefix** also shows after you save a new affiliate prefix, and so does this button.

## Update the links in your posts

Link Manager Pro can update the old-prefix short links in your posts for you. It offers this on the General tab after you save a new prefix, and you review the changes before anything is edited.

::: warning
Updating edits your post content. WordPress saves a revision of each post first, but only where your site keeps revisions. Back up your site before you select **Replace**.
:::

Link Manager › Settings › General

1. After you save the new prefix, find the notice **Links in your posts still use a previous prefix**. It also shows each time you open the General tab while posts still use one.
2. Select **Update links in posts**. A window checks your posts and pages, then shows how many links in how many posts use a previous prefix.
3. Read the list of posts, 20 to a page. Each post shows its links as **Now** (the old address) and **Becomes** (the new one). It shows up to three links per post and counts the rest.
4. Check the other parts, if they show. A post Link Manager Pro can't save stays in the list, unticked, with the reason under its title. **In page-builder data** names posts to fix in the builder yourself.
5. Back up your site. The next step edits posts.
6. Posts start ticked. Untick any you want to leave, or use **Select all on this page**. Then select the button that names the count, like **Update 12 selected posts**. A **Replace links in posts?** box asks you to confirm, with a **Back up first** link. Select **Replace**.
7. The next page of posts opens. Repeat step 6 for each page, or use **Previous** and **Next** to move between pages. Select **Finish** when you're done.
8. Read the result. **Updated 12 links in 3 posts.** shows how many links changed in how many posts. Any post it skipped is listed with the reason.

If you aren't ready, select **Not now**. The notice comes back the next time you open the General tab.

What the update changes:

- It scans published, scheduled and private posts and pages. Drafts and pending posts are left alone.
- It changes only links on your own site that use a previous prefix and whose slug is an existing short link. A page under the old prefix, or a slug that doesn't exist, stays as it is.
- Each link moves to the current prefix of its kind: **Short link prefix** or **Internal link prefix**. While an **Affiliate link prefix** is set, a link to an affiliate's domain moves to that prefix instead.
- The **Update links in posts** button under **Affiliate link prefix** moves only affiliate links, to that prefix, from any other prefix of yours, current or previous. Other links stay as they are. With the prefix empty, it moves only links that sat under a previous affiliate prefix, back to the **Short link prefix**.
- Posts built with a page builder, such as Elementor, keep their builder data. They're listed, not changed. Update those links in the builder.
- A post it can't save stays as it is and is listed with the reason, such as you can't edit it, or saving it would also change its status.
- Running it again finds nothing new, because the updated links no longer match.

Link Manager Pro remembers the last 5 prefixes you replaced, and this update covers all of them. The update still works after the 90 days end, as long as the old prefix is among those 5.

Have many posts? The WP-CLI command `replace-prefix-links` does the same update, and `--dry-run` shows what would change first ([Update old prefix links with replace-prefix-links](https://docs.linkmanagerpro.com/guides/wp-cli#update-old-prefix-links-with-replace-prefix-links)).

Posts not updated keep their old-prefix links, and Link Manager Pro still treats them as short links:

- **Mask internal links** leaves them as they are, and `wp link-manager-pro unlink` restores them like any other short link.
- **Affiliate disclosure** counts them when they lead to an affiliate's domain.
- A click on one counts only on the short link, never as an internal click ([Clicks on links to your own pages](https://docs.linkmanagerpro.com/features/internal-click-tracking#details)).
- A link's **Placed in** count and **Top posts sending clicks** include those posts.

## Keep a printed or shared address working for good
To keep one old address working whatever you change later, add it to its short link as an other address after the change. A flyer, a printed QR code or an old newsletter then keeps opening the link, even after more than five prefix changes.

1. Open the link's report from Link Manager › Short Links.
2. Under **Other addresses**, enter the old address, for example `/link/spring-sale`.
3. Select **Add**. The address shows **Opens this link**.

Add it after you saved the new prefix. Before, it's still the link's own address, and **Add** answers **That is already this link’s short address.**

- An other address opens the link only while no page, post, archive or active redirect uses the same path ([How is a visit to an other address answered?](https://docs.linkmanagerpro.com/guides/other-addresses#how-is-a-visit-to-an-other-address-answered)).
- A link can have up to 25 other addresses, and you add them one by one. Keep this for the few addresses you can't change, and update the rest.
- Visits through it count as clicks on the link, as before.

## How do you check that the new prefix works?

Open a short link with the new prefix in a private browser window. You should land on its destination. The old address opens the same destination too. If the new address shows your 404 page instead, check that the link is live (not scheduled or expired), and reload the General tab to see the saved prefix.

1. Reload Link Manager › Short Links. The addresses in the list start with your new prefix.
2. Open a link's report and select **Copy link**. The address uses the new prefix, like `yoursite.com/out/spring-sale`.
3. Open that address in a private window. Your own visit counts as a click, logged in or not.

Check **Address conflicts** under Link Manager › Short Links a little later. Conflicts are checked again for all links shortly after a prefix change. A new conflict after the change usually means an other address now matches a short link under the new prefix ([Fix a short link address conflict](https://docs.linkmanagerpro.com/guides/other-addresses#fix-a-short-link-address-conflict)).

## How do you change the prefix back?

Follow the same steps and enter the old prefix in **Short link prefix**. Its addresses work again, with no time limit, and the prefix you leave becomes an old prefix. Links in posts you already changed to the new prefix then need updating again. **Update links in posts** does that too.

## Details

| Topic | After a prefix change |
|---|---|
| Old prefix | Opens any short link for 90 days from the save. After that it opens one only where WordPress has nothing at the address and the link is live. The last 5 replaced prefixes are kept |
| Changing back | The old prefix is current again and works with no limit. The one you leave is kept as an old prefix |
| New prefix | Lowercase letters, numbers and hyphens. Different from the other two prefixes and not a WordPress path. Only the **Affiliate link prefix** may be empty. A refused prefix shows a message under its field, and the page shows **Couldn’t save. Your edits are kept.** ([General settings](https://docs.linkmanagerpro.com/guides/settings/general#short-link-prefix)) |
| Slugs, destinations, clicks, reports | Unchanged |
| Other addresses | Unchanged. Conflicts are checked again for all links shortly after the change |
| Auto-links | New prefix the next time a page is shown |
| Admin addresses | **Copy link**, QR code and **Download QR** in the report use the new prefix. The **Short Links** list, with its **Copy link** and QR codes, does after a page reload |
| Links saved in posts | Keep the old prefix until you select **Update links in posts** on the General tab, or run `replace-prefix-links` ([see above](#update-the-links-in-your-posts)) |
| **Update links in posts** | Covers the last 5 replaced prefixes, inside or after the 90 days. Edits published, scheduled and private posts and pages, saving a revision first. Page-builder data is listed, not changed |
| `unlink`, disclosure, **Mask internal links** | Treat old-prefix links as short links too ([General settings](https://docs.linkmanagerpro.com/guides/settings/general#short-link-prefix)) |
| **Track clicks on internal links** | A click on an old-prefix link counts only on the short link, not as an internal click. The same goes for an old address you keep as an other address, while it opens the link |
| Page cache | Saving a new prefix clears the cache of supported cache plugins, while **Clear page cache when links change** is on ([Integrations settings](https://docs.linkmanagerpro.com/guides/settings/integrations#clear-page-cache-when-links-change)) |

## Get more out of it

- Settle the prefix before you share links widely. Every printed or emailed address carries it, and a change leaves them to update. A short word like `link` or `out` is easy to read aloud.
- Give your most important printed addresses a path without any prefix. An other address like `/deal` doesn't depend on your prefix. A later change doesn't break the flyer, unless `deal` itself becomes your prefix ([Other addresses and conflicts](https://docs.linkmanagerpro.com/guides/other-addresses#get-more-out-of-it)).
- Tell your host or CDN about the old prefix. If you keep `/link/` on its never-cache list, keep it there next to the new prefix. Supported cache plugins don't need this ([Integrations settings](https://docs.linkmanagerpro.com/guides/settings/integrations#get-more-out-of-it)).
- Use **Placed in** to track progress. In a link's report, it counts only posts that link to it with a current prefix. It climbs back as you update posts.

## If something goes wrong

- If old short link addresses stopped working, then most likely a page, post or redirect now uses that address, or the link is scheduled or expired. After five more prefix changes, the oldest prefix stops too. Update the links or add the address as an other address.
- If a post in the update list is unticked with a reason under its title, then Link Manager Pro couldn't save it, and the reason says why. Fix the cause, such as your account's editing rights, then run the update again.
- If the update stops part-way, then posts already changed keep their new links. Select **Update links in posts** again for the rest.
- If you can't find **Internal link prefix**, then **Mask internal links** is off. Turn it on, change the prefix, then turn it off again before you select **Save changes**.
- If **Couldn’t save. Your edits are kept.** shows next to the buttons, then read the message under the prefix field. The prefix may be empty, use other characters than lowercase letters, numbers and hyphens, be a WordPress path like `page`, or match another of your prefixes.
- If a page on your site now opens a destination instead, then its address is the new prefix plus a short link's slug. Choose another prefix, or change that short link's slug.
- If posts lost the disclosure notice, then their short links still use the old prefix and have no `sponsored`. Update those links.

More fixes are on [Troubleshooting](https://docs.linkmanagerpro.com/troubleshooting).

## Related

- [General settings](https://docs.linkmanagerpro.com/guides/settings/general)
- [Other addresses and conflicts](https://docs.linkmanagerpro.com/guides/other-addresses)
- [Short links in your posts](https://docs.linkmanagerpro.com/features/link-masking)
- [WP-CLI commands](https://docs.linkmanagerpro.com/guides/wp-cli)
- [Troubleshooting](https://docs.linkmanagerpro.com/troubleshooting)
