விளக்கம்
AffLoc is a lightweight, cache-friendly WordPress plugin designed to help you maximize your affiliate revenue globally. It automatically detects your visitor’s country via IP and swaps out your affiliate links to match their regional store (e.g., Amazon US vs Amazon UK), ensuring you never lose a commission due to a “Not Available in Your Country” error.
Features
- Automatic Geolocation: Detects visitor country securely and accurately.
- Country-Specific Links: Assign different URLs for the same offer based on the user’s country code.
- Cache-Friendly: Uses a hybrid JavaScript approach so it works perfectly with caching plugins (WP Rocket, W3 Total Cache, etc.).
- Global Fallback: Define a default link for countries without a specific mapping.
- Easy Shortcodes: Simply use
[affloc_link slug="your-offer"]and let the plugin handle the rest.
External Services
This plugin relies on the following external services to function:
1. ipapi.co – Used to detect the visitor’s country securely over HTTPS by resolving their IP address. Their privacy policy is available at https://ipapi.co/privacy/. No personal data other than the user’s IP address and proxy headers is transmitted.
2. flagcdn.com – Used to deliver fast and reliable SVG/PNG country flag icons inside the WordPress Admin Dashboard.
Screenshots

The AffLoc admin page featuring the Add New Mapping form (Offer Slug, Country search, Affiliate text and URL fields) alongside the sidebar with White-label Shortcode (Pro), Shortcode Helper, and Import / Export Mappings tools. 
The Existing Mappings table — all mappings grouped by slug/project, showing country flags, destination URLs, ready-to-copy shortcodes with a “Copy Shortcode” button, creation date, and Edit/Delete row actions. 
Inserting the shortcode into a page using the WordPress block editor (Gutenberg) — add a standard Shortcode block and paste [affloc_link slug="your-slug" text="Buy Now"].
The rendered result on the front end — a geo-localised “Buy Now” affiliate link automatically swapped to the correct regional URL based on the visitor’s country.
Installation
- Upload the plugin files to the
/wp-content/plugins/afflocdirectory, or install the plugin through the WordPress plugins screen directly. - Activate the plugin through the ‘Plugins’ screen in WordPress.
- Navigate to AffLoc in your WordPress admin menu.
- Add your first mapping (e.g.,
slug: amazon,country: US,url: https://amazon.com/...). - Use the shortcode
[affloc_link slug="amazon" text="Buy Now"]in your posts or pages.
அடிக்கடி கேட்கப்படும் கேள்விகள்
-
Does it work with caching plugins?
-
Yes! The substitution happens on the client side (in the browser), meaning your pages remain fully cacheable.
-
Which IP geolocation service is used?
-
We use the free ipapi.co service with a secure HTTPS connection. The plugin also caches the location in the user’s browser to minimize API calls and speed up link swapping.
Reviews
இந்த செருகுநிரலுக்கு மதிப்புரைகள் எதுவும் இல்லை.
பங்களிப்பாளர்கள் & உருவாக்குனர்கள்
“AffLoc — Affiliate Link Localization” is open source software. The following people have contributed to this plugin.
பங்களிப்பாளர்கள்Translate “AffLoc — Affiliate Link Localization” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
0.2.0
- Features: Added maximum mapping limit and Affiliate Text shortcode support.
- Refactoring: Conformed strictly to WordPress Database APIs for SQL queries.
0.1.5
- Enhancements: Added copy-to-clipboard functionality for shortcodes.
- Enhancements: Admin UI improvements including country flags, grouping, searching, date sorting, and row actions.
- Security: Switched to secure HTTPS endpoints for IP geolocation.
- Security: Added comprehensive IP validation including support for Cloudflare/Proxies.
- Performance: Frontend scripts now only load on pages containing the shortcode.
0.1.0
- Initial Beta release.
