=== PrettyLinks – Affiliate Link Management, URL Shortener, Link Cloaking, Tracking & Branded Short Links ===
Contributors: supercleanse, cartpauj
Donate link: https://prettylinks.com
Tags: affiliate links, url shortener, link cloaking, link tracking, link management
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 7.0
Stable Tag: 4.0.9
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

🌠 Shorten, brand, and track any URL on your own domain. Keep your links — and your data — where they belong. 🔗

== Description ==

PrettyLinks takes any long, ugly URL and turns it into a short, branded link on your own domain. So instead of sharing some endless affiliate string, you share `yoursite.com/recommends/widget` — clean, memorable, and unmistakably yours. No more renting your links from bit.ly, tinyurl.com, or whichever shortener raised its prices this year.

Here's the part people love most: your links and your click data live on your site, not someone else's. You own the branding. You keep the analytics. And if a destination URL ever changes, you update it once and every link you've ever shared just keeps working.

## Why people pick PrettyLinks 🌠

If you share links for a living — affiliate marketers, bloggers, podcasters, social media folks — you want three things: links that look professional, the freedom to change where they point, and a real picture of what's getting clicked. PrettyLinks does all three. Every click is logged with referrer, browser, OS, and host, so you're never guessing about what's working.

And version 4.0 is a big one. We rebuilt the whole thing from scratch on a fast, modern React admin, then added smarter bot filtering, built-in privacy controls, and CSV link importing — all of it free.

## PrettyPay™ Links 💵

Want to sell something? PrettyPay™ lets you spin up a one-click Stripe checkout link and share it anywhere — e-books, courses, downloads, subscriptions, you name it. It all runs through your own domain and brand. Share the link, get paid. No store required.

## Lite Features ✔️

**[🔗 Branded Short Links on Your Own Domain](https://prettylinks.com/about?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**
Turn any long URL into a clean, branded short link in seconds.

**[💰 PrettyPay™ Stripe Checkout Links](https://prettylinks.com/docs/prettypay-links/?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**\*
Create one-click payment links with Stripe. Share anywhere and start selling instantly.

**[🔃 301, 302 and 307 Redirects](https://prettylinks.com/about?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**
Choose between Permanent (301) and Temporary (302/307) redirects per link.

**[⚙️ Custom or Auto-Generated Slugs](https://prettylinks.com/about?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**
Pick your own slug or let PrettyLinks generate one. Reserved Slug Patterns protect critical WordPress paths from accidental collisions.

**[🔎 Click & Unique-Click Tracking](https://prettylinks.com/about?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**
Every click logged with referrer, IP, browser, OS, and host data.

**[🤖 Modern Bot Filtering](https://prettylinks.com/about?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**
Keep AI crawlers and bots out of your stats out of the box — with Cloudflare bot-header support and your own custom user-agent rules.

**[🔐 Built-In Privacy Controls](https://prettylinks.com/about?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**
IP anonymization and a configurable click-retention window help you stay GDPR-friendly.

**[📊 Customizable Click Reports](https://prettylinks.com/about?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**
Filter charts by date range, link, and unique vs. total clicks.

**[⬆️⬇️ CSV Import & Export](https://prettylinks.com/about?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**
Bulk-import links from a spreadsheet and export click history to CSV anytime — link importing is now free.

**[🖱️ One-Click Sharing & Copy](https://prettylinks.com/about?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**
Copy any link to the clipboard from the links list, the editor, or a Gutenberg block.

**[💡 Modern Admin Experience](https://prettylinks.com/about?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=features)**
A fast, clean React-based admin UI with bulk actions, one-click duplicate, and auto-saving options.

... and much more. [Visit our site](https://prettylinks.com?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=home) to see everything PrettyLinks can do.

\* Pro users pay no added processing fees. Free users have a small 3% per-transaction fee added on PrettyPay™ links.

## PrettyLinks Pro 💪

When you're ready for more, *PrettyLinks Pro* adds the automation, advanced redirects, and deeper reporting that power users tend to grow into:

* [**Keyword & URL Replacements**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Map keywords to links and PrettyLinks automatically turns them into your branded links across your site's content.

* [**Advanced Redirect Types**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Cloaked, JavaScript, Meta-Refresh, Tracking Pixel, and branded Splash Page redirects on top of the standard 301/302/307.

* [**Geographic, Device & Time Targeting**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Send visitors to different destinations based on country, device, browser, OS, day, or hour.

* [**Link Rotation & A/B Split Testing**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Distribute traffic across multiple destinations by weight or round-robin, and split-test which one converts.

* [**Expiring Links**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Set an expiry date or click limit and choose where expired traffic goes.

* [**Categories & Tags**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Organize and filter a large link library with full taxonomy-style grouping.

* [**Auto-Create Links for Posts & Pages**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
A pretty link is created automatically every time you publish.

* [**Link Health Monitoring**](https://prettylinks.com/blog/repair-broken-links?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Scheduled scans flag broken destinations, with email digests so you can fix them fast.

* [**QR Codes**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Auto-generate a downloadable QR code for every link, with an optional inner logo.

* [**Pretty Bar Branding**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Frame third-party destinations in a branded top, bottom, or floating bar with your CTA.

* [**Advanced Reports & Conversions**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Rich click-history breakdowns, KPI cards, charts, and a conversion-tracking pixel for your thank-you pages.

* [**Redirect Turbo Mode**](https://prettylinks.com/features?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro_features)
Answer link requests before the rest of WordPress loads — built for high-traffic affiliate sites.

## Pro Add-ons 🧩

Pro plans come with a handful of optional add-ons. Install the ones you need, skip the ones you don't:

* **Link in Bio** — Build customizable "link in bio" landing pages for Instagram, TikTok, and other social profiles, hosted on your own domain.
* **Product Displays** — Drop styled, responsive product cards into any post or page to showcase affiliate products.
* **Splash Pages** — Show a branded interstitial (with optional CTAs) before forwarding visitors, with a per-link conversion funnel report.
* **UTMs** — Build and append Google Analytics UTM parameters from a dedicated tab on the link editor.
* **User Links** — A front-end dashboard letting logged-in visitors create and manage their own pretty links.
* **Developer Tools** — API tokens and webhooks for integrating PrettyLinks with external systems.

[See Why Upgrade](https://prettylinks.com/why-upgrade?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro "Why Upgrade") | [Pricing](https://prettylinks.com/pricing/plans?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=pro "Pricing")

## Integrations ⚡

* [MonsterInsights](https://prettylinks.com/docs/integrating-pretty-links-with-monsterinsights?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=kb) — Surface PrettyLinks click data inside the MonsterInsights dashboard.
* [CookieYes](https://prettylinks.com/docs?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=kb) — Automatic cookie consent compliance for click tracking.
* [Easy Affiliate](https://easyaffiliate.com/) — Use PrettyLinks as the affiliate link layer in your Easy Affiliate program.
* Gutenberg & Classic Editor — Native block + toolbar buttons for inserting links inline.

## What's Next 🤩

Enjoying PrettyLinks? Check out our other plugins:

* [MemberPress](https://memberpress.com/) — Full-featured membership and course platform for WordPress with Stripe, PayPal, and Authorize.net support.
* [Easy Affiliate](https://easyaffiliate.com/) — Run your own self-hosted affiliate program and grow your traffic with referral marketing.
* [Members](https://members-plugin.com/) — Roles and capabilities management plugin for fine-grained access control.

== Installation ==

1. Upload `pretty-link.zip` to `/wp-content/plugins/` (or install via Plugins → Add New).
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Make sure your permalink settings (Settings → Permalinks) are set to anything other than "Plain". Custom permalinks like `/%year%/%month%/%postname%/` work great.
4. Open **PrettyLinks** in the admin menu and follow the onboarding wizard to create your first link.

== Frequently Asked Questions ==

= Who will find PrettyLinks useful? =
Affiliate marketers, bloggers, podcasters, course creators, social media managers, e-commerce merchants, and anyone else who needs to brand, organize, and track outbound links.

= Can I use PrettyLinks with any WordPress theme? =
Yes. PrettyLinks operates primarily in the WordPress admin and the front-end pieces are theme-agnostic.

= How do I get started? =
The in-plugin onboarding wizard walks you through the basics. For deeper docs, see our [Getting Started page](https://prettylinks.com/doc-categories/getting-started/).

= Is upgrading from 3.x to 4.0 safe? =
Yes. 4.0 is a drop-in upgrade — all of your existing links, clicks, and settings keep working with no migration step. As with any major update, back up your site first.

= What add-ons are available for PrettyLinks Pro? =
Pro includes six add-ons: **Link in Bio**, **Developer Tools**, **Product Displays**, **Splash Pages**, **UTMs**, and **User Links**. Link in Bio and Developer Tools are available on Marketer and above; the rest are on Executive. See the [add-ons page](https://prettylinks.com/add-ons/?utm_source=wordpress.org&utm_medium=lite_plugin_listing&utm_content=faq) for details.

= Is PrettyLinks translatable? =
Yes. PrettyLinks is fully translation-ready — see our [translation guide](https://prettylinks.com/docs/translating-pretty-link-pro/) for instructions.

= What's the difference between 301, 302, and 307 redirects? =
**301 (Permanent)** tells search engines the URL has permanently moved — link equity is passed to the destination. **302** and **307 (Temporary)** signal a temporary redirect, so search engines keep indexing the original URL. Pro adds Cloaked, JavaScript, Meta-Refresh, Tracking Pixel, and Splash Page redirect types on top of these.

= Are there any fees for using PrettyPay™? =
Stripe's standard processing fees always apply. PrettyLinks adds no extra fee for Pro users. Free users have a small 3% per-transaction PrettyLinks fee added on top of Stripe's fees.

== Screenshots ==

1. The PrettyLinks admin dashboard
2. Adding a Pretty Link
3. Click tracking and reports
4. Settings page

== Changelog ==

= 4.0.9 =
* Pro: Fixed link categories and tags appearing blank in the admin after upgrading from 3.x, even though the assignments still existed — an automatic one-time repair restores them (and their link counts) on the next admin load, with no manual re-tagging needed.
* Pro: New — you can now export Custom Reports and Split Test results to CSV.
* Pro: Fixed cloaked links falling back to a visible redirect for destinations that actually allow framing, so more links stay cloaked. The framing check is now also cached per destination (24 hours by default), so repeat cloak and Pretty Bar visits skip the extra lookup and load faster.
* Pro: Link Health — "Force check now" now re-checks every link, and checks fall back to a GET request when a destination rejects the lighter HEAD request, reducing false "broken link" results.
* Pro: Link Health — fixed a scheduled recheck occasionally overwriting a more recent "Force check now" result.

= 4.0.8 =
* Pro: Fixed licensed Pro installs being silently replaced by the free build during an update when the license couldn't be verified at that moment (a brief connection hiccup, or right after a major update) — which locked every Pro feature even though the license still showed Active. Updates now stay on your licensed Pro build, and the free build can no longer overwrite it; a wrong-edition install still shows the reinstall prompt on the Plugins screen.

= 4.0.7 =
* Fixed every Pretty Link returning a 404 on WordPress installs located in a subdirectory (for example, a site at example.com/blog) — the redirect engine now correctly accounts for the site's base path.
* Fixed Pretty Links whose slug contains characters such as ".", "=", "~" or "+" returning a 404 — the full range of slug characters supported in 3.x works again, and those characters are no longer stripped when you save a link.
* New: added a per-link "Reset clicks" action to the Links list, available in every tracking mode.
* Pro: you can now paste a whole list of countries into a geo targeting rule (comma-, space-, or bracket-separated country codes or names) instead of adding them one at a time.
* Pro: expiring links can now be set to move to the Trash on their first expired visit, in addition to the existing "redirect to another URL" option.
* Pro: clarified the compound targeting rule label to "All conditions match (AND)" so it's clear every condition must be met.

= 4.0.6 =
* Pro: Fixed geo targeting never matching on hosts without CDN country headers — country resolution now falls back to IP geolocation like v3, so country rules work everywhere.
* Pro: When the visitor's country can't be determined, country rules no longer match and the link's normal target URL is used.
* Geo lookups are now cached per network block (up to a month when the geolocation database confirms the whole block shares one country), greatly reducing lookup calls on busy links.
* The IP anonymization setting is now honored by all geolocation caching; nothing derived from the full IP is stored when it's enabled.
* Fixed IPv4-mapped IPv6 addresses (dual-stack servers) being anonymized down to an unusable value in click records.
* Cloudflare's "XX" unknown-country pseudo-code is no longer treated as a real country by geo rules.

= 4.0.5 =
* Pro: Restored QR code downloads (PNG and SVG) from the Links list and link editor, added logo support to SVG QR codes, and improved scannability for codes that include a logo.
* Pro: The per-link QR code preview now encodes the link's own pretty URL.

= 4.0.4 =
* Fixed a fatal error (TypeError) in the admin footer text when another plugin or host sets it to a non-string value.

= 4.0.3 =
* Fixed a fatal error on hosts that run OPcache with doc-comments disabled (opcache.save_comments=0), such as Kinsta.

= 4.0.2 =
* Refreshed the "What's New in 4.0" page copy.

= 4.0.1 =
* Maintenance: distribution packaging cleanup; no functional changes.

= 4.0.0 =
* Complete rewrite — brand-new React-based admin UI, REST-first API, and custom-table data model
* PHP 7.4+ required; full PHP 8.x compatibility
* Drop-in upgrade — no migration required, all 3.x data continues to work
* Performance: faster click tracking, lighter admin pages, and leaner database queries
* New: IP-anonymization toggle that truncates IPv4 / IPv6 addresses before they're stored
* New: configurable click-retention window — 30 days up to 2 years (was hardcoded to 90 days, on/off only)
* New: automatic safety wipe of click counters when switching between Simple and Normal/Extended tracking modes
* New: modern bot detection — catches AI crawlers (GPTBot, ClaudeBot, PerplexityBot…), honors Cloudflare Bot Management headers, and adds behavioral signals, plus your own custom user-agent patterns
* New: PrettyPay™ master on/off toggle (no longer always-on once Stripe is connected)
* New: Reserved Slug Patterns moved from Pro into Lite, with a new admin-bypass toggle and distinct slug prefixes for admin-, user-, and frontend-created links
* New: CSV link import is now free (was Pro-only in v3), with a downloadable starter template
* New: chunked CSV export that handles large link libraries without timing out
* New: click-history CSV export across all links, with date-range and link-ID filters
* New: one-click "Duplicate" on any link
* New: bulk "turn nofollow on/off" and "turn sponsored on/off" actions across selected links
* New: one-click slug regenerate button on the Add/Edit Link form
* New: per-user "items per page" picker and column show/hide on the Links list, saved to your account
* New: Options page auto-saves — change any field and it saves on its own
* New: Connect-Stripe step inside the setup wizard
* New: CookieYes integration — auto-tags pretty-link redirects so they're consent-gated by your cookie banner
* PRO: Redirect Turbo Mode — opt-in must-use plugin that answers pretty-link requests before the rest of WordPress loads
* PRO: no_enforce_url_scheme option — disable the automatic http:// prepend so you can target custom protocols (app://, tel:, etc.)
* PRO: Link Health — choose how often destinations are checked and how often you get the broken-link digest, separately, plus a multi-status filter on the Links list
* PRO: Keyword & URL Replacements — case-sensitive matching toggle, a new per-post total-links cap (defaults to unlimited), and distinct nofollow / sponsored / open-in-new-window and custom-CSS settings for URL-replaced anchors
* PRO: Rotations — pick Weighted Random or Sequential round-robin (v3 was random-only with weights ignored)
* PRO: Smart targeting — new operators: exclude-country, hour-of-day range, day-of-week, plus compound AND-rules
* PRO: Pretty Bar — multiple branded templates instead of one global look, plus a Media-library logo picker
* PRO: Custom Reports — new [pretty_link_pixel] shortcode and Gutenberg block to drop a tracked-conversion pixel onto any thank-you page
* PRO: Link list filter segments — "Expired" and "Split tests" segments, and the search box now matches category and tag names
* PRO: Click History extras — KPI cards, an over-time line chart, a top-links list, and breakdown tabs by country / referrer / device / browser, each with a donut chart
* PRO: Dashboard extras — KPI tiles become clickable, drilling into Click History pre-filtered to the matching date range and link
* PRO: Splash Pages add-on (new) — branded "splash" interstitial redirect type with up to two CTAs and a per-link conversion funnel report
* PRO: UTMs add-on (new) — dedicated UTM tab on the link editor for all six Google Analytics UTM parameters, no URL hand-editing
* PRO: User Links add-on (new) — front-end self-service dashboard for logged-in visitors to create and manage their own pretty links
* PRO: Link in Bio add-on — rebuilt on the v4 foundation with three frontend templates; existing v3 pages migrate automatically
* PRO: Product Displays add-on — rebuilt on the v4 foundation with a shortcode and server-rendered Gutenberg block
* PRO: Developer Tools add-on — rebuilt on the v4 foundation with API keys, HMAC-signed webhooks, an event registry, and a v3-compatibility REST layer

== Upgrade Notice ==

= 4.0.0 =
Major release. Complete rewrite with a new React admin UI and modular add-on architecture. Drop-in upgrade — back up your site before updating.
