Why do I see a 404 page when testing an affiliate referral link?

Troubleshooting pretty URLs

If you're seeing a 404 page when testing an affiliate referral link (using a pretty URL structure such as /ref/123, or /ref/john) the following may help:

  1. Go to Settings → Permalinks
  2. Click Save Changes (you don't need to change anything)
  3. Test the affiliate referral URL again

Doing the above will flush WordPress` rewrite rules and should fix the issue.

Tip: Simply visiting the permalinks page without saving anything will still flush the rewrite rules, but clicking a button sure feels good!

  • If after flushing your permalinks, you’re still seeing a 404 error, try re-saving AffiliateWP's General settings. Go to the Affiliates → Settings → General tab, scroll to the bottom of the page and click Save Changes.
  • If pretty URLs are still showing a 404 page, it may be due to a plugin conflict. To diagnose this, try temporarily deactivating all other plugins except for AffiliateWP. Flush your permalinks as per the steps above, and test pretty URLs again.
  • If pretty URLs are still not working correctly, you may need to change your permalink structure type* in WordPress’ permalink settings (i.e. "Post Name"). You can check your permalink structure under Settings → Permalinks

* Important note on changing your permalink structure type: 

  • Any existing links to your website on 3rd-party sites or saved by visitors/customers with a different URL structure ("Default", etc.) may break if you change your existing permalink structure type without setting up URL redirects - especially if your website is well-established. 
  • There are various plugins available on the WordPress repository which allow you to set up redirects, so you can change your permalink structure without impacting external links or traffic to your website. 
  • If you're in the process of building your website, and pretty URLs are your preferred URL structure, using the "Post Name" or other pretty URL structure type from the outset will allow you to avoid these issues. (AffiliateWP accepts no responsibility for broken links if the permalink structure type is changed by a site admin.)
If pretty URLs are still not working after trying the above steps, please get in touch with our support team for additional help.