Custom Affiliate Slugs Installation and Usage

AffiliateWP provides many different affiliate URL variations that your affiliates can use simultaneously. Custom Affiliate Slugs takes this one step further, allowing affiliates to create their own custom “slug”. A slug is the piece of the referral URL where there would usually be the affiliate’s username or ID.

In this article, we’ll show you how to install and set up the Custom Affiliate Slugs add-on for AffiliateWP.


Installing the Custom Affiliate Slugs Addon

Before we get started, be sure to install and activate AffiliateWP on your WordPress site.

Once you’ve got AffiliateWP installed and your license is verified you’ll be able to quickly install and activate the Custom Affiliate Slugs add-on.

After installing the Custom Affiliate Slugs add-on, the next step is to configure your settings.

Setting up Custom Affiliate Slugs

To configure the Custom Affiliate Slugs settings navigate to AffiliateWP » Settings and then click on the Custom Affiliate Slugs tab.

Allow Custom Affiliate Slugs

Enable this option if you’d like all affiliates to be able to add a custom slug. Leave this option unchecked if you only want to enable custom slugs on a per-affiliate level (see below).

Show Custom Slug

If your Default Referral Format in AffiliateWP’s General settings tab is set to ID or Username you can enable this option and the affiliate’s custom slug (if they have one) will be shown on the Affiliate URLs tab of the Affiliate Area, (however the URL generator will continue to work only for the ID or Username). If you set the Default Referral Format to Custom Affiliate Slug, the affiliate ID or Username will not be shown, the affiliate’s custom slug will be shown in place of their ID and username, plus they will be able to use the URL generator to generate a referral URL with their slug in it.

Auto-create Custom Slugs

Enable this option if you’d like custom slugs to be automatically generated for your affiliates when:

  1. An affiliate registers via the affiliate registration form
  2. The Auto Register New Users option is enabled from AffiliateWP » Settings » Affiliates and a user is automatically registered as an affiliate
  3. An affiliate is added manually via the AffiliateWP » Affiliates » Add New screen

When this option is enabled an Auto-create Slug Settings section will appear with the following options:

Slug Preview

This will show the admin an example of what an automatically generated slug could look like. This preview will dynamically update as you alter the slug type and slug length as mentioned below.

Slug Type

Choose between an alphanumeric (letters and numbers) or alphabetic slug (letters only).

Slug Length

Set the length of a newly generated slug (the maximum length is 60 characters as per WordPress’ default username standards).

Setting the Default Referral Format

If you’ve been using AffiliateWP for some time, we’ve added settings to make Custom Affiliate Slugs more seamless without disrupting your affiliates’ experience.

If your default referral format is set to ID or Username, this is what affiliates will be used to seeing in the Affiliate URLs tab of the Affiliate Area. By enabling the Show Custom Slug option in AffiliateWP » Settings » Custom Affiliate Slugs, the affiliate will still see their ID or username as normal, however they will also now see their custom slug, and a custom slug URL they can use above their ID or username. If they use the URL Generator, this will continue to generate a URL for the affiliate using their ID or username (depending on which default referral format you have set).

When you install and activate Custom Affiliate Slugs, a new Custom Affiliate Slug option will also appear in the Default Referral Format dropdown in the AffiliateWP » Settings » Affiliates tab. This allows you to show an affiliate their referral URL with their custom slug, rather than the ID or username. The affiliate will also be able to generate a referral URL using the generator with their custom slug (their ID or username will not be visible).

  • Go to AffiliateWP » Settings » Affiliates tab of the settings
  • Scroll down to the Default Referral Format dropdown menu and select Custom Affiliate Slug
  • Click the Save Changes button at the bottom of the page

Once this option is enabled, the URL shown in the Affiliate URLs tab of the Affiliate Area will include the affiliate’s custom slug. If an affiliate does not have a custom slug, or they remove it themselves, it will fallback to showing their username as the default referral format.

Per-Affiliate custom slugs

An admin can allow custom slugs on a per-affiliate basis.

  1. Go to the AffiliateWP » Affiliates screen
  2. Click on the name of the affiliate you wish to enable custom slugs for
  3. Enable the Allow Custom Slug checkbox option
  4. Click the Update Affiliate button

Changing an existing affiliate’s slug as an admin

An admin can change an affiliate’s custom slug:

  1. Go to the AffiliateWP » Affiliates screen
  2. Click on the name of the affiliate you wish to change the custom slug for
  3. Find the Custom Slug field and enter a new slug for the affiliate (or remove it)
  4. Enable the confirmation checkbox that will appear after validation passes
  5. Click the Update Affiliate button

Adding a custom slug while adding a new affiliate

An admin can add a custom slug while they are adding a new affiliate:

  1. Go to the AffiliateWP » Affiliates screen
  2. Click the Add New button
  3. Select the affiliate from the User field, and complete the other fields
  4. Enter a custom slug in the Custom Slug field
  5. Click the Add Affiliate button

If no custom slug is entered for the affiliate, and  Auto-create Custom Slugs is enabled from the admin settings, a randomly generated custom slug will be given to the affiliate.

Exporting a .CSV file of affiliates and their custom slugs

An admin can export a .CSV file that contains the current custom slug for each affiliate.

  1. Go to AffiliateWP » Tools and make sure you’re on the Export/Import tab
  2. In the Export Affiliates section, select a status and then click the Export button
  3. At the download prompt click OK (or similar) to download the .CSV file to your computer
  4. Inside the .CSV file, there will be a new column titled Custom Slug.

Adding a custom slug as an affiliate

  1. Go to the Affiliate Area’s Settings tab.
  2. Enter a slug in the Custom Affiliate Slug input field.
  3. Enter the slug one more time to confirm in the confirmation field that appears.
  4. Click the Save Profile Settings button.

Here’s the Custom Affiliate Slug input field in the Affiliate Area:

Frequently Asked Questions

How do I enable custom affiliate slugs for all affiliates?

Navigate to AffiliateWP » Settings » Custom Affiliate Slugs and check the box labeled Allow Custom Affiliate Slugs. This will allow all affiliates to create custom slugs.

What should I do if I receive an error when setting a custom slug?

If you receive an error stating This slug cannot be used. it means the slug is already in use by another WordPress username. Choose a different slug that is unique.

How can an affiliate create their own custom slug?

Affiliates can create their custom slug by going to the Affiliate Area’s Settings tab, entering a slug in the Custom Affiliate Slug field, and clicking the Save Profile Settings button.

Why can’t I enable custom slugs for an individual affiliate?

Make sure that the Allow Custom Affiliate Slugs option is disabled in AffiliateWP » Settings » Custom Affiliate Slugs. Custom slugs can only be enabled on a per-affiliate basis if this global setting is disabled.

Why am I seeing the error “Your slug cannot contain all numbers” when setting a custom slug?

Custom slugs cannot be composed entirely of numbers. Ensure that the slug includes alphabetic characters to comply with the system requirements.


That’s it! By allowing your affiliates to create personalized referral URLs, you not only enhance their experience but also provide a unique branding opportunity. Custom Affiliate Slugs can make referral links more memorable and professional, potentially increasing affiliate engagement and conversions.