Skip to content

How to Create a Vanity URL in WordPress: 4 Tested Methods

How to Create a Vanity URL in WordPress: 4 Tested Methods

To create a vanity URL in WordPress, give a page a short slug or point a short address at a longer one with a redirect. A vanity URL such as example.com/podcast is easy to say, print and remember, and it can carry tracking codes without showing them.

I tested four ways to create one in October 2026 on a WordPress 7.1.3 test site. I used a page slug, the Redirection plugin 5.10.1, Pretty Links 4.0.16 and an .htaccess rule and checked the status code each one returned.

This guide shows every method step by step, with screenshots and the test results. It also covers two traps I found. Pages lose their old address when you change a slug, and a redirect can hide a real page.

What Is a Vanity URL in WordPress?

A vanity URL in WordPress is a short, readable address on your own domain that leads to a page or a longer link. It is either the real address of a page, set by its slug, or a redirect that forwards visitors elsewhere. Both kinds look the same to the person typing them.

People use vanity URLs in places where a long link fails:

  • Print: Flyers, packaging and business cards, such as example.com/mugs.
  • Audio and video: Podcasts and videos where a host says the address out loud.
  • Campaigns: Ads and emails where the short link hides a long UTM code.
  • Social profiles: Bios that allow one short link.

A vanity URL is not the same as a new domain. Some brands buy a short separate domain for links, but a path on your main domain is free and builds trust in your own name.

The WordPress permalinks documentation explains how WordPress builds every address on your site. Vanity URLs build on the same system.

How to Create a Vanity URL in WordPress: 4 Methods

To create a vanity URL in WordPress, choose one of four methods. Edit a page slug, add a 301 with Redirection, create a short link with Pretty Links or add a server rule. Each one gave a different status code in my test, and that code decides how search engines treat the link.

How to create a vanity URL in WordPress: four methods compared

Here is the short version:

  • Page slug: The page itself lives at the short address with status 200.
  • Redirection plugin: A 301 permanent redirect with a hit counter.
  • Pretty Links: A 302 temporary redirect by default with click tracking.
  • Server rule: A 301 redirect written in .htaccess that needs no plugin.

Pick a slug when the page should live at that address. Pick a redirect when the short address should send people somewhere else.

Before You Start: Turn On Post Name Permalinks

Vanity URLs need readable permalinks before anything else on the site. Go to Settings > Permalinks, choose Post name and click Save Changes. Without it, pages use addresses like ?page_id=56, and plugins that build short links may not work as expected.

WordPress permalink settings with Post name selected

My test site already used Post name, which most sites do by default today. Saving this screen also refreshes WordPress’s rewrite rules, which fixes many “page not found” errors on new short addresses.

Changing the structure on an older site changes every post address at once. Do it only on a new site, or add redirects for the old addresses first.

Our guide to setting up pretty permalinks in WordPress covers the other structures and what each one is for.

Method 1: Edit the Page Slug

The simplest vanity URL is the page’s own slug. Open the page, click the slug in the sidebar, type a short word and save. The page then lives at that address with no redirect at all. That is the cleanest result for visitors and search engines.

Follow these steps:

  1. Open the page in the editor.
  2. In the Page tab of the sidebar, click the value next to Slug.
  3. Type the short slug (such as sale).
    WordPress page slug edited to create a vanity URL
  4. Click Save and then open the new address to check it.

My page “Spring Sale 2026” started with the slug spring-sale-2026. After the change, /sale/ loaded the page with status 200.

Watch out for one trap when you change a slug later. WordPress keeps the old address of a post and redirects it, but it does not do this for pages. When I renamed the page’s slug, the old /sale/ returned 404, while an old post slug redirected with 301.

So add a redirect from the old address whenever you rename a page that people already use.

If a campaign page starts from an old one, you can copy a page in WordPress first and then give the copy its own slug.

Method 2: Use the Redirection Plugin

The Redirection plugin sends a short address to any page or link with a 301 redirect and counts every hit. Install it, add a source URL and a target URL and click Add Redirect. It suits vanity links that will not change. A 301 tells search engines the move is permanent.

Redirection is free, with over 2 million active installs, as of October 2026. See its plugin page for details. Here are the steps:

  1. Go to Plugins > Add Plugin, search for Redirection and install and activate it.
  2. Go to Tools > Redirection and finish the short setup.
  3. Under Add redirect, type the short address in Source URL, such as /podcast.
  4. Type the destination in Target URL and include any UTM codes.
    Redirection plugin adding a vanity URL redirect
  5. Click Add Redirect.

I visited /podcast three times. Each visit returned 301 to /latest-posts/?utm_source=podcast&utm_medium=audio, and the list showed 3 hits with the date of the last one.

Redirection plugin vanity URL with 301 code and hit count

The hit counter is enough to see whether a podcast or flyer link gets used. For full campaign data, the UTM codes in the target send the visit into Google Analytics with its source.

Pretty Links is built for short tracking links. Create a link, paste the long target URL, choose a slug and pick the redirect type. Version 4 uses a 302 redirect by default. Change it to 301 if the link is permanent.

Pretty Links has over 200,000 active installs, as of October 2026, and its plugin page lists the free and Pro features. Here are the steps:

  1. Install and activate Pretty Links from Plugins > Add Plugin.
  2. Go to Pretty Links > Add New.
  3. Give the link a name and then paste the long address in Target URL.
  4. Type a short Slug, such as mugs, and check the Redirect type.
    Pretty Links creating a vanity link with a 302 redirect
  5. Click Create link.

My /mugs link returned 302 to the shop page with its UTM codes. The free version offers 302 and 301, while cloaked, JavaScript and pixel redirects are Pro features.

Pretty Links also turns on nofollow for new links by default. That matters if you use it for affiliate links, since Google asks for those links to be marked.

If you want a dedicated short link tool, LinkCentral is another option. It creates short links with a custom prefix and slug, such as yoursite.com/go/your-custom-slug. The free version offers 301, 302 and 307 redirects, click analytics and QR codes, according to its plugin page as of October 2026.

Pick it when you manage many vanity links and want click reports for each one. For a few permanent 301 redirects, Redirection is enough.

Method 4: Add a Redirect Without a Plugin

On an Apache server, one line in the .htaccess file creates a vanity URL with no plugin. Add the rule above the WordPress block, save the file and test the short address. This suits a handful of fixed links, but every change needs file access. A plugin is easier when several people manage links.

Add this line at the top of .htaccess in your site’s root folder:

Redirect 301 /promo /shop/

On my test site, /promo returned 301 to /shop/ right away. The Apache mod_alias documentation explains the Redirect directive and its options.

The rule matches the start of the path. A rule for /promo also catches /promo/summer. Use RedirectMatch 301 ^/promo$ /shop/ when you want only the exact address.

Back up .htaccess before you edit it. A typo there can take the whole site offline with a 500 error.

Nginx servers do not read .htaccess. On Nginx, add a location = /promo { return 301 /shop/; } block to the server config instead and reload Nginx.

How to Choose a Good Vanity URL

A good vanity URL is short, lowercase and free on your site. Keep it to one or two words, use hyphens between words and avoid anything WordPress already uses. In my test, WordPress renamed pages called feed, shop and embed to feed-2, shop-2 and embed-2.

Those names were taken by the feed, the WooCommerce shop page and the embed system. The wp_unique_post_slug() reference explains how WordPress blocks reserved and duplicate slugs.

On my test site, the editor quietly added -2. The page saved fine but lived at a different address from the one I typed. Check the final slug after you save.

Case does not matter with Redirection’s default settings. My /PODCAST test redirected exactly like /podcast, because the plugin ignores case and the trailing slash unless you change it.

Say the address out loud before you print it. If a listener could spell it two ways, pick the simpler one or create both.

Which Redirect Type Should You Use?

Use a 301 redirect for a vanity URL that will always point to the same place. Use a 302 when the target changes, such as a link to this month’s sale. Search engines treat a 301 as a permanent move and a 302 as temporary. The choice affects which address they index.

WordPress vanity URL redirect test results

Google’s guide to redirects explains how each type is handled. MDN has short references for 301 and 302 as well.

Browsers remember a 301. A visitor who opened your vanity link once may keep going to the old target even after you change it, until their cache clears. That is the main reason to use 302 for links whose target you plan to swap.

Plugins also offer 307 and 308. They behave like 302 and 301 but keep the request method, which matters for form posts and APIs rather than for vanity links.

A vanity redirect itself does not boost rankings. Search engines index the destination page. The SEO value stays with that page.

Common Vanity URL Mistakes to Avoid

The worst vanity URL mistake is a short address that clashes with a real page. In my test, a redirect on /sale/ won over the existing page at /sale/, and the page became unreachable. Check that the slug is free before you create the link.

Watch for these:

  • Slug clash: Search your pages and posts for the slug first, because a redirect hides the page.
  • Renamed pages: Add a redirect from the old page address, since pages get no automatic one.
  • Wrong redirect type: Use 301 for permanent links and 302 only for links you will change.
  • Long targets with no tracking: Add UTM codes to the target so you can measure each campaign.
  • Too many plugins: Use one redirect plugin, because two can fight over the same address.

Keep a simple list of every vanity URL, its target and where it was printed. A printed flyer can stay in use for years. The link must keep working.

If redirects and indexing feel risky on a large site, our WordPress SEO services include redirect audits and cleanup.

Conclusion

To create a vanity URL in WordPress, use a page slug when the page should live at the short address. Use a redirect when it should send people somewhere else.

The Redirection plugin gives a 301 with a hit counter, and Pretty Links gives click tracking with a 302 by default. A one line .htaccess rule works with no plugin at all.

Check that the slug is free first, because a redirect hides any page at the same address. Add a redirect whenever you rename a page, since WordPress only redirects old post slugs.

Frequently Asked Questions (FAQs)

Q1. Can I create a vanity URL in WordPress without a plugin?

Yes. Edit the page slug for a page that should live at the short address. For a redirect, add a Redirect 301 line to .htaccess on Apache, or a return 301 block on Nginx.

Q2. Is a vanity URL good for SEO?

It helps people remember and share the link, but the redirect itself does not raise rankings. Search engines index the destination page. A 301 vanity URL passes its value to that page.

Q3. Should a vanity URL use a 301 or a 302 redirect?

Use 301 for a link that always points to the same page. Use 302 only when you plan to change the target, such as a seasonal sale.

Pretty Links 4.0.16 used 302 Found by default in my test. Change the Redirect type to 301 Moved Permanently when you create the link if it is permanent.

Q5. Why does my old page address show a 404 after I changed the slug?

WordPress only redirects old slugs for posts. For pages, add a redirect from the old address to the new one with a redirect plugin or a server rule.

Q6. How do I track clicks on a vanity URL?

The Redirection plugin counts hits for each redirect, and Pretty Links records clicks. LinkCentral also shows click analytics for each short link. For campaign data, add UTM codes to the target URL so Google Analytics shows the source.

Yash Kapoor
Yash Kapoor

Yash Kapoor is the founder and WordPress expert at DevDiggers, where he builds WordPress and WooCommerce plugins for loyalty programs, point-of-sale systems, digital wallets and affiliate management. He writes about developer tools, site performance and the technical side of running a WordPress store. He draws on years of building and maintaining production plugin codebases.

Leave a Reply

Your email address will not be published. Required fields are marked *