Skip to main content

What are custom X-headers and why use them?

X-headers are custom header fields that begin with "X-". They let senders add arbitrary metadata to messages without conflicting with standard headers defined in RFCs.

Common uses:

Tracking IDs: X-Campaign-ID: summer-sale-2026 identifies which campaign generated the message.

Internal routing: X-Priority: high or X-Mail-Type: transactional helps internal systems process messages differently.

Debugging: X-Debug-Info: server=mta05, queue=12345 records information useful for troubleshooting.

Customer identification: ESPs add headers like X-Account-ID to identify which customer sent each message.

X-headers pass through the email system untouched (unless specifically filtered). Receiving servers ignore them unless they have rules that examine specific headers.

Important considerations:

Don't include sensitive data; headers are visible to recipients

Keep names descriptive and consistent

Some receiving systems strip X-headers, so don't rely on them reaching recipients

Modern convention allows custom headers without X- prefix, but X- remains common

They're notes in the cargo manifest. The shipping company reads them; the recipient usually doesn't notice.