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

Troubleshooting pretty URLs

If you’re seeing a 404 page when testing an affiliate 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

Performing the above steps will flush WordPress’ rewrite rules and should fix the issue.

If the 404 error persists after performing the above steps:

  1. If after flushing your permalinks, you’re still seeing a 404 error, try re-saving AffiliateWP’s General settings. Go to the AffiliateWP » Settings » General tab, scroll to the bottom of the page and click Save Changes.
  2. If the 404 error persists, try clearing your browser cache. If you are using a caching plugin on your WordPress site, clear the cache on your site as well.
  3. 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.
  4. If pretty URLs are still not working correctly, you could try changing your permalink structure type in WordPress’ permalink settings (i.e. Post Name). You can check your permalink structure under Settings » Permalinks

Important notes when 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.