Cybersecurity Glossary

What is URL Rewriting?

Written by IRONSCALES | May 29, 2026 12:00:00 PM

URL Rewriting Explained

URL rewriting is an email security technique that replaces hyperlinks in inbound messages with modified URLs that route through a security proxy at the moment a recipient clicks. This enables time-of-click analysis, where the destination is inspected for malicious content when the user actually navigates to it, rather than relying solely on delivery-time scanning. The technique addresses a fundamental gap in traditional secure email gateway filtering: links that appear safe at delivery but become weaponized hours or days later.

When an email arrives, the security platform parses the message body, identifies all embedded hyperlinks, and rewrites each one. The original destination URL is encoded into a new link that points to the vendor's scanning infrastructure. The rewritten URL persists in the email regardless of where or when the recipient opens it.

How URL Rewriting Works

The URL rewriting process follows a consistent sequence across implementations:

  • Link extraction. The email security platform parses every inbound message and identifies all clickable URLs, including those embedded in HTML, anchor text, and button elements.
  • URL encoding. Each original URL is encoded and appended as a parameter to a new proxy URL controlled by the security vendor. The rewritten link replaces the original in the delivered message.
  • Click-time interception. When a recipient clicks the rewritten link, the request routes through the security proxy instead of going directly to the original destination.
  • Real-time scanning. The proxy resolves the original URL, follows any redirect chains, and analyzes the landing page for indicators of compromise. Checks typically include domain reputation, page content analysis, and file download inspection.
  • Verdict and redirect. If the destination passes inspection, the user is transparently redirected to the original page. If it fails, the proxy blocks navigation and displays a warning.

This model provides a clear advantage over delivery-only scanning for threats that use delayed weaponization, where a benign page is swapped for a credential harvesting portal or fake login page after the email has already landed in the inbox.

Limitations of URL Rewriting

Despite its value as a defense layer, URL rewriting has well-documented weaknesses that sophisticated threat actors actively exploit.

Redirect chain abuse. Attackers construct multi-layered redirect chains that bounce through legitimate services, URL shorteners, and even other organizations' rewriting proxies. Each hop adds complexity that can exhaust the scanner's follow depth or timeout window. Research from 2025 documented campaigns that deliberately stacked rewritten links from multiple email security providers, burying the final malicious destination under layers of trusted infrastructure.

Conditional content delivery. Threat actors use CAPTCHA gates, browser fingerprinting, and geolocation checks to serve benign content to automated scanners while delivering malicious payloads to real users. These sandbox evasion techniques work because the rewriting proxy is an automated system that can be identified and served a clean page.

Timing gaps. While click-time scanning closes the delivery-to-click window, it still depends on the scanning infrastructure being faster than the attack. Fast-flux domains and rapidly rotating infrastructure can present a clean page during the proxy's sub-second analysis, then immediately redirect the user's browser to the actual payload.

Reduced URL visibility. Rewritten URLs obscure the actual destination from end users. Recipients cannot hover over a link to verify the domain before clicking, which undermines security awareness training that teaches URL inspection. This creates a dependency on the scanning proxy to catch every threat.

Coverage inconsistencies. URL rewriting typically applies to specific email platforms and message types. Links in calendar invitations, collaboration tool notifications, or forwarded messages may not be rewritten, leaving gaps that attackers can target through link-jacking or phishing delivered through adjacent channels.

The industry has increasingly shifted toward continuous link analysis that scans URLs before, during, and after delivery, rather than depending on a single click-time checkpoint. This approach combines behavioral AI, reputation monitoring, and computer vision to detect threats without requiring user interaction to trigger a scan.

URL Rewriting Protection from IRONSCALES

IRONSCALES continuously protects against malicious links using behavioral analysis, reputation checks, and computer vision to detect weaponized URLs in real time at the inbox level.

Related Terms

Email Attack of the Day is a daily series from IRONSCALES spotlighting real phishing attacks caught by Adaptive AI and our community of 35,000+ security professionals. Each post breaks down a real attack. What it looked like, why it worked, and what to do about it.