# Affiliate link redirects

{% hint style="warning" %}

### Important Note for Amazon Associates

Using local redirects for **Amazon affiliate links** may violate the Amazon Associates Program Policies.\
Enable link cloaking for Amazon only if you understand and accept the risks.\
Many publishers prefer **direct (non-cloaked)** links for Amazon.
{% endhint %}

### What Are Local Redirects?

Local redirects (also known as *link cloaking*) let you replace long, messy affiliate URLs with clean, branded links hosted on your own site.

**Example:**

```
https://example.com/go/polymaker-polyterra-pla-175-black-ab12cd/
```

When a visitor clicks the clean link, your site instantly redirects them to the merchant’s affiliate URL.

### Benefits

* **Cleaner, more trustworthy links** — human-readable, branded URLs can improve click-through rates (CTR).
* **Consistent site-wide structure** — customize your redirect prefix and status codes for uniformity.
* **Light obfuscation** — can hide affiliate parameters from basic crawlers (not intended for SEO manipulation).
* **Ad-block resilience** — some simple filters may be bypassed (advanced blockers can still detect redirects).
* **Analytics support** — works seamlessly with **Click Statistics** and **GA4 event tracking**.

### How to Enable Link Cloaking

#### 1. Enable per Module

1. Go to **Content Egg → Modules**.
2. Choose your desired module.
3. Set **Link Cloaking** to **Enabled**.

<figure><img src="/files/k5stG4niuRxptmSA7YEY" alt=""><figcaption></figcaption></figure>

> Each module can have different settings, allowing you to follow each affiliate network’s policy.

#### 2. Wait for Indexing

After enabling, Content Egg will index all existing product links in the background via **WP-Cron**.

* On large sites, this may take a few minutes.
* Ensure that **WordPress Cron** is enabled and running.

#### 3. Configure Redirect Behavior (Global)

Go to **Content Egg → Settings → Frontend** and set:

* **Redirect Status Code** – Choose **301**, **302**, or **307**.
* **Redirect Prefix** – Default is `go`, but you can use `recommend`, `visit`, `deal`, etc.

> After making changes, **purge any caches or CDN** to ensure your new links work immediately.

### Choosing the Right Redirect Code

| Status Code                  | Description                                        | Recommended For    |
| ---------------------------- | -------------------------------------------------- | ------------------ |
| **302 (Found)**              | Common and safe for temporary redirects.           | ✅ Affiliate links  |
| **307 (Temporary Redirect)** | Similar to 302, preserves HTTP method strictly.    | ✅ Affiliate links  |
| **301 (Moved Permanently)**  | May pass link equity, but risky for affiliate use. | ⚠️ Not recommended |

### Troubleshooting & FAQ

#### Why do some links still appear direct?

* Indexing may still be running — give it a few minutes.
* Ensure Link Cloaking is enabled for that module.
* Confirm that **WordPress Cron** is active.
* **Clear your site and CDN caches.**

#### My clean link returns a 404 error.

* Go to **Settings → Permalinks** and click **Save Changes** (this flushes rewrite rules).
* Then, **purge your caches/CDN** again.

#### What’s the 6-character suffix in the slug?

It’s a deterministic fingerprint that ensures **uniqueness and stability**.\
It does **not** contain personal data.

#### Does cloaking bypass ad blockers?

Not completely. Cloaked links may avoid **simple domain-based filters**, but advanced ad/tracker blockers can still detect redirects.

**Tips to reduce blocking:**

* Use neutral prefixes (e.g., `/visit/`, `/deal/`) instead of `/go/` or `/out/`.
* Avoid terms like *affiliate*, *ref*, or *track* in your HTML.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ce-docs.keywordrush.com/features/affiliate-link-redirects.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
