Redirect rules: smart routing by conditions
Route traffic by device/country/time and use a fallback URL when no rule matches — improve UX and conversions.
Tip: Always test priority order to avoid wrong matches or loops.
Concept
Each link can have multiple rules. The system evaluates rules by priority order and applies the first match. If nothing matches, it uses the fallback URL.
- Rule = (conditions) + (destination URL).
- Higher priority rules run first.
- Put narrow/specific rules before broad ones.
Common conditions
You can route traffic by multiple criteria. Depending on the system, you can enable/disable these condition groups:
Redirect based on device (mobile/desktop/tablet) to deliver the best landing experience.
- Mobile → fast mobile-optimized landing.
- Desktop → richer content landing.
Route by country to match language/offer.
- VN → Vietnamese landing / local offer.
- US → English landing / US offer.
Route by time windows for promos or campaign testing.
- Peak hours → offer A.
- Off-hours → offer B.
Priority
Priority prevents broad rules from overriding specific ones. Always define a clear order.
- Narrow targeting (US + Mobile) first.
- Broader rules (Mobile) after.
- “Any/All” rules last (before fallback).
Fallback URL
Fallback is used when no rule matches. It ensures the link always works.
- Use a stable default landing as fallback.
- Do not point fallback back to the same link (loop risk).
- Preserve UTM if needed (system-dependent).
301 vs 302
Choose the right redirect code for your goal:
Use when you frequently change destinations, run A/B tests, or route dynamically.
- More flexible, less “hard cache”.
- Great for campaigns/ads.
Use when destination is stable and you want a “permanent” signal.
- May cache longer.
- Good for docs or permanent migrations.
Quick examples
Common rule patterns (illustrations):
| Country = VN AND Device = Mobile | https://example.com/vn-mobile |
|---|---|
| Country = VN | https://example.com/vn |
| Device = Mobile | https://example.com/mobile |
| Fallback | https://example.com/default |
| Time = 20:00–23:59 | https://example.com/flash |
|---|---|
| Time = 00:00–19:59 | https://example.com/normal |
| Fallback | https://example.com/normal |
Testing & debugging
Before going live, test rules carefully:
- Test on mobile/desktop; use VPN for geo testing if needed.
- Confirm 301/302 responses match configuration.
- If loop happens: check fallback and ensure no rule points back to the same link.
- If wrong match: check priority order and condition values.
FAQ
Want smart redirects by rules?
Open the dashboard to create links and configure redirect rules per campaign.