Guide

How to Set Up Affiliate Links in WordPress (2026)

Manage affiliate links in WordPress with ThirstyAffiliates or Pretty Links. Learn link cloaking, disclosure requirements, and tracking best practices.

Affiliate marketing lets you earn commissions by recommending products. WordPress with the right plugin makes affiliate link management clean, trackable, and compliant. Here's the complete setup.

Raw affiliate URLs look like https://example.com/?ref=abc123&source=link. Link cloaking transforms these into clean URLs like yoursite.com/recommends/product-name. Benefits: professional appearance, easier management if URL changes, click tracking, and cleaner sharing on social media.

  1. Install ThirstyAffiliates from the plugin directory
  2. Go to ThirstyAffiliates → New Affiliate Link
  3. Enter the link name, destination URL, and set the cloaked slug (e.g., /recommends/product-name)
  4. Set link type to 301 redirect (better for SEO) or 307 temporary
  5. Enable No Follow attribute (required for FTC compliance)
  6. Click Save Affiliate Link

Insert links into posts using the ThirstyAffiliates button in the editor, or type the affiliate link name in the post editor.

FTC Disclosure Requirements

The FTC requires clear disclosure when you earn commissions from links. Add a disclosure at the beginning of posts containing affiliate links:

This post contains affiliate links. If you purchase through these links, I may earn a commission at no extra cost to you.

ThirstyAffiliates Pro supports automatic disclosure insertion. The free WP Disclosure plugin also handles this.

Tracking Performance

ThirstyAffiliates Pro includes click tracking with reports. For the free version, connect Google Analytics 4 event tracking by adding UTM parameters to your affiliate links (e.g., ?utm_source=affiliate&utm_campaign=product-name).

Affiliate programs change or expire. Review your top affiliate links quarterly. ThirstyAffiliates Pro alerts you to broken links automatically.

Start building with SiteICO

Deploy your WordPress site in under 1 second. Follow our guides to get the most out of the platform.

No credit card required.