An email header is the hidden information attached to every message you send or receive
When you open an email, you see the subject line, the sender's name, and the message body. But behind that visible layer sits an email header — a block of technical data that records every step your message took from sender to your inbox. The header includes the sender's actual email server address, the route the message traveled through, timestamps, and authentication details. Most email programs hide this information by default, but you can view it in a few clicks.
Email headers exist because messages don't travel directly from one person to another. Instead, they bounce through multiple mail servers, each one adding its own line of information before passing the message along. That trail is what makes headers useful for tracing where an email actually came from — especially when a sender's display name doesn't match the server that sent it.
Key Takeaways
- Email headers contain the sender's mail server address, routing information, and timestamps — data that email programs hide by default but you can view in settings.
- The "From" line you see in your inbox is often just a display name; the actual sender information is buried in the header's "Return-Path" or "From" field.
- Headers show the complete path a message took through mail servers, with each server adding a "Received" line that includes its name and the time it processed the message.
- Authentication fields like SPF, DKIM, and DMARC in the header tell you whether the message passed security checks that verify the sender is legitimate.
The main sections of an email header
An email header breaks into a few key parts. The Return-Path field shows the actual email server address that sent the message — this is what you need to identify the real sender. The Received lines form a chain showing every mail server the message passed through, listed in reverse order (the last server to touch it appears first). Each Received line includes the server's name, its IP address, and a timestamp.
Below that sit the From, To, Subject, and Date fields — the ones you already see in your inbox. The Message-ID is a unique identifier assigned by the sending server. At the bottom, you'll find authentication results: SPF, DKIM, and DMARC lines that show whether the message passed security checks designed to prevent spoofing.
The exact order and content of headers can vary depending on which mail servers handled the message and what security systems scanned it. Gmail adds different header information than Outlook, and corporate email systems often insert their own security headers. But the core pieces — Return-Path, Received lines, and authentication results — appear in nearly every message.
How to view email headers in common programs
In Gmail, open the message and click the three-dot menu in the top right. Select "Show original" to see the full header in a new window. The header appears at the top, followed by the message content.
In Outlook (web version), open the message and click the three dots in the top right. Select "View message details" or "View message source" depending on your version. Desktop Outlook is slightly different: right-click the message in your inbox, select "Properties" (Windows) or "Get Info" (Mac), then look for a "Message" or "Internet Headers" tab.
In Apple Mail, open the message and go to the View menu at the top. Select "Message" and then "All Headers" to display the full header above the message body. In Mozilla Thunderbird, right-click the message and select "View Message Source" to see everything at once.
Reading the Received lines to trace a message's path
The Received lines tell you where an email traveled. Read them from bottom to top — the bottom line is where the message started, and the top line is where it arrived at your mail server. Each line includes the server's hostname (often something like "mail.company.com" or a longer identifier), its IP address in brackets, and a timestamp showing when that server processed the message.
A typical Received line looks like this: "Received: from mail.sender.com (mail.sender.com [192.0.2.1]) by mail.yourprovider.com with SMTP id abc123 for user@yourmail.com; Mon, 15 Jan 2024 14:32:05 +0000". This tells you the message came from mail.sender.com with IP 192.0.2.1, arrived at your provider's server, and was processed at that specific date and time.
If you see a gap in the Received lines — for example, a jump from one company's server directly to yours with no intermediate servers — that's normal for direct mail delivery. But if the sender's server doesn't match the Return-Path address, or if timestamps jump backward, those are signs the message may have been altered or spoofed.
What authentication fields tell you about a message
Near the bottom of the header, you'll see lines starting with "Authentication-Results" or individual fields for SPF, DKIM, and DMARC. These are security checks that verify the message actually came from the domain it claims to come from.
SPF (Sender Policy Framework) checks whether the sending server's IP address is authorized by the domain's owner. A line reading "spf=pass" means the check succeeded; "spf=fail" means the server sending the message is not authorized to send mail for that domain. DKIM (DomainKeys Identified Mail) adds a digital signature to the message that proves it hasn't been altered in transit. "dkim=pass" means the signature is valid.
DMARC (Domain-based Message Authentication, Reporting and Conformance) is a policy that tells receiving servers what to do if SPF or DKIM fail. "dmarc=pass" means the message passed the domain's DMARC policy. If you see "fail" on any of these, it doesn't automatically mean the message is dangerous — some legitimate mail fails these checks due to forwarding or misconfiguration — but it is a warning sign worth investigating.
Why headers matter for identifying spoofed or phishing emails
Scammers often create emails that look like they come from a bank, a company, or someone you know, but the header reveals the truth. A phishing email might display "From: support@yourbank.com" in the inbox view, but the Return-Path in the header shows it actually came from a completely different server. The Received lines might show the message bounced through suspicious servers in other countries. Authentication fields might show "spf=fail" or "dkim=fail", indicating the message is not actually from the domain it claims.
This is why viewing headers is one of the first steps in checking whether an email is legitimate. If the sender's display name doesn't match the Return-Path, or if the Received lines show an unusual path, or if authentication checks failed, the message is likely not what it claims to be. Headers don't tell you whether the content is safe — you still need to avoid clicking links or downloading attachments from suspicious messages — but they do tell you whether the sender is who they say they are.
Common header fields and what they mean
| Field | What It Shows |
|---|---|
| Return-Path | The actual email server address that sent the message; the real sender. |
| From | The sender's display name and email address as shown in your inbox; can be spoofed. |
| To | Your email address and display name as the message was sent to you. |
| Subject | The message subject line. |
| Date | The timestamp when the sending server created the message. |
| Message-ID | A unique identifier for this message assigned by the sending server. |
| Received | A line added by each mail server the message passed through, showing the server name, IP address, and timestamp. |
| SPF | Result of the Sender Policy Framework check; shows if the sending server is authorized by the domain. |
| DKIM | Result of the digital signature check; shows if the message was altered in transit. |
| DMARC | Result of the domain's authentication policy; shows if the message passed the domain owner's rules. |
Frequently Asked Questions
Can I see email headers on my phone?
Yes, but it depends on your email app. Gmail's mobile app lets you open a message, tap the three dots, and select "Show original" just like the web version. Outlook's mobile app has a similar option under the three-dot menu. Apple Mail on iPhone shows headers if you swipe left on the message and tap "Details". Third-party apps vary — check your app's settings or help section for the exact steps.
What does it mean if a Received line shows my own mail server?
If you see your own mail server's name in a Received line, it means the message passed through your server at some point. This is normal for forwarded messages or messages sent to a mailing list. It doesn't mean anything is wrong — it just shows the message took a longer route than a direct path from sender to you.
Can someone fake an email header?
The visible parts of a header (From, Subject, Date) can be faked by someone with access to a mail server. But the Received lines and authentication results are added by mail servers themselves and are much harder to forge. If you see Received lines from legitimate mail servers and authentication checks pass, the header is genuine. If authentication fails or Received lines look suspicious, the message is likely spoofed.
Why do some emails have really long headers?
Long headers usually mean the message passed through many mail servers or was scanned by multiple security systems. Each server and security tool adds its own lines to the header. Corporate emails often have longer headers because they pass through company mail servers, security gateways, and archiving systems. A long header is not a sign of anything wrong — it's just a sign the message took a complex route.
What should I do if the header shows the message is spoofed?
If the Return-Path doesn't match the From address, or if Received lines show an unusual path, or if authentication checks failed, treat the message as suspicious. Don't click links, don't read attachments, and don't reply with personal information. You can report the message as spam or phishing to your email provider, which helps them block similar messages in the future.