301 vs 302 redirects for affiliate links: which one, and how to fix the wrong one
November 28, 2026 · Hoplytic team · 5 min read
Read the video transcript
Which redirect code should affiliate links use, 301 or 302?
Use 302 or 307. A 301 says the move is permanent, so browsers may cache it and skip your tracker on repeat clicks.
301 and 308 are permanent. Browsers cache them. Avoid them for affiliate links. 302 and 307 are temporary. Use those.
A 301 means lost clicks, sales you can't match, offers you can't change, and rotators and geo rules that stop working for returning visitors.
The SEO argument doesn't apply either. Google asks for rel sponsored on affiliate links. Keep 301 for your own pages that moved for good.
Paste a link into the redirect checker and read the status of the first hop. If it's a 301, switch to 302 now, in settings and on each existing link. You can't clear visitors' caches, so give important links a new address, and keep the old one working.
Every Hoplytic link answers with a 302 and no-store, so each click reaches the tracker and you can change offers anytime.
The full guide is right below. Hoplytic: ad tracking made simple.
Key points
- Use a 302 or 307 for affiliate and tracking links, because browsers can cache a 301 and skip your tracker on repeat clicks.
- A 301 brings no SEO benefit to affiliate links: Google asks for rel="sponsored" or rel="nofollow" on them, and the destination is not your page.
- 301 is the right choice for your own content pages that have moved for good, not for links whose destination you may change.
- You can't clear a 301 from visitors' browsers, so fixing it means switching to 302 now and, for important links, using a new address.
Almost every link plugin and tracker lets you pick a redirect code. Most people pick once and forget. For affiliate links that choice decides whether repeat clicks are counted and whether you can ever change the destination.
Short answer: use 302 (or 307) for affiliate and tracking links. A 301 tells browsers the move is permanent, so they may cache it and go straight to the old destination next time, skipping your tracker. A 301 gives affiliate links no SEO advantage, because those links should carry rel="sponsored" anyway. Keep 301 for your own pages that have moved for good.
The four codes in one table
| Code | Meaning | Cached by browsers? | For affiliate links |
|---|---|---|---|
301 | Moved permanently | Yes, often for a long time | Avoid |
308 | Moved permanently, keep the method | Yes | Avoid |
302 | Found (temporary) | No, unless the response says so | Use |
307 | Temporary, keep the method | No, unless the response says so | Use |
The table on tracking redirects and domains also covers meta refresh and JavaScript redirects. This guide is about the 301 vs 302 decision itself and what to do when it was made wrong.
Why affiliates are told to use 301, and why it's wrong
The advice comes from SEO for site moves. When you move /old-review to /new-review, a permanent redirect tells Google the new page should replace the old one. Google's documentation treats a permanent redirect as a strong signal that the target is the page to show, and a temporary one as a weak signal.
An affiliate link is different. The destination is someone else's page, and you don't want it to replace anything of yours. Google's rule for paid and affiliate links is to mark them rel="sponsored" (or rel="nofollow"). With that attribute on the link, the redirect code has nothing to pass on. So the SEO argument for 301 doesn't apply, and only its downside remains.
What a 301 actually costs you
- Lost clicks in your stats. A returning visitor's browser may skip your tracker and go straight to the cached destination. No click is recorded, no click ID is made.
- Sales you can't match. If the cached destination already contains an old click ID, a new sale gets credited to a click from weeks ago, or to nothing at all.
- You can't change the offer. Switch
/go/mattressfrom one merchant to another and some returning visitors still land on the old merchant, possibly on a program you've left. - Rotators and geo rules stop working for those visitors, because the decision is made once and then cached.
When 301 is the right choice
- Your own article moved to a new URL for good.
- You changed your site's domain and every page maps one to one.
- You merged two posts into one.
In each case the destination is your page and will never change again. None of that describes an affiliate link.
A gray area: an old cloaked address such as /recommends/desk that you retire and point at its replacement /go/desk. It feels permanent, but the replacement is itself a link whose destination you may change, and a 301 would freeze the chain in visitors' browsers. Use a 302 here too.
302 or 307?
For link clicks there is no practical difference. Both are temporary. 307 adds a guarantee that the browser repeats the same request method, which only matters when a form is posted. Use whichever your tool offers. What matters more is that the redirect response is not marked cacheable: a header such as Cache-Control: no-store makes sure even a temporary redirect is asked for fresh every time.
How to check what your links use
Paste a link into the redirect checker and read the status of each hop. Or from a terminal:
curl -sI https://go.yourblog.com/mattress
HTTP/2 302
location: https://www.awin1.com/cread.php?awinmid=1234&awinaffid=5678&clickref=c7f3a9e1
cache-control: no-store
Check the first hop, which is the one you control. Later hops belong to the network and the merchant, and they may use 301s internally; that is their choice and usually harmless.
In a WordPress link plugin, the redirect type is usually a global setting plus a per-link override. Defaults have changed between plugin versions, so open the settings and look, rather than assuming. A changed default often applies only to new links, so check a few old ones too.
Already using 301? How to recover
- Switch to 302 now in your tool's settings and on each existing link. New visitors and anyone whose cache has expired will be tracked again.
- Accept that some caches stay. You can't clear a visitor's browser cache from your side. For most links this fades as people clear browsers or switch devices.
- Give important links a new address if you need to change their destination right away: a new short code with a 302 is fresh for everyone. Update the posts, videos and ads that matter most.
- Keep the old address working. Point it at the same new destination. Never delete it, because old content still links to it.
Moving to a new link tool
When you migrate from a WordPress plugin to a hosted tracker, your old /go/ addresses have to keep working. The redirect rules you add for them (in a plugin, .htaccess, Nginx or Cloudflare) should also be 302s, for the same reason: the old address now points at a tracking link whose destination you may change. The Pretty Links alternative guide covers the move itself.
On Hoplytic
Every Hoplytic link answers with a 302 and Cache-Control: no-store, so each click reaches the tracker and you can change offers, rotators and backup links at any time. The redirect files made when you import from Pretty Links, ThirstyAffiliates or Lasso use 302 as well. Details are in importing links.
Questions people ask
Does a 301 redirect pass link juice to the affiliate merchant?
That isn't something you want on an affiliate link. Google asks for affiliate links to be marked rel="sponsored" or rel="nofollow", so ranking value is not passed either way.
Is 307 better than 302 for affiliate links?
For normal clicks they behave the same: both are temporary and not cached by default. 307 also guarantees the browser keeps the request method, which only matters for form posts, not for link clicks.
Can a 302 hurt my site's SEO?
No. A 302 on a tracking link tells search engines the address is temporary, so they keep the destination out of your site's signals. That is what you want for links to other sites.
How do I check which redirect my link uses?
Run it through a redirect checker or use curl -sI followed by the link. The status line of each hop shows 301, 302, 307 or 308.
More in Tracking fundamentals
Also: tracking glossary · ad platform macros · Markdown copy