Sub topic 9
Content, Links, and Formatting as Supporting Signals
This chapter assumes you have read the earlier chapters on authentication, sender reputation, engagement, and the filtering stack. You should be comfortable with SPF, DKIM, and DMARC records and with the idea that mailbox providers score a sender's history before they look at a message.
Where content sits in the decision
Content is a supporting signal. A mailbox provider first checks who sent the message (authentication, domain and IP reputation) and how recipients have treated that sender's earlier mail (engagement). Content filters run alongside those checks and adjust the result. They rarely override it.
This gives two practical rules:
- A message from a sender with a strong reputation can contain imperfect content and still reach the inbox.
- A message from a sender with a weak reputation can have clean content and still land in spam.
Content matters most in three cases: a new sender with little history, a message that looks very different from the sender's usual mail, and mail that looks like known phishing or malware.
What content filters examine
Filters read several parts of a message. Each part gives a different kind of evidence.
| Part of the message | What a filter looks for |
|---|---|
| Headers | Missing or malformed fields, a From address that does not match the authenticated domain, a forged Reply-To |
| Subject line | Deceptive claims, such as a fake "Re:" prefix on a first message |
| Body text | Phrases and patterns that match known spam or phishing |
| HTML structure | Broken markup, hidden text, very large images, heavy use of scripts or forms |
| Links | Destination domain reputation, redirects, shorteners, mismatch between visible text and target |
| Attachments | File type, known malware signatures, password-protected archives |
Modern filters use machine learning models trained on large volumes of labeled mail. They do not rely on a fixed list of banned words. A single word such as "free" does not trigger a spam verdict. The model weighs many features together, and the weights change as spammers change tactics.
Links
Links are among the strongest content signals because they connect a message to infrastructure that can be checked.
Destination domain reputation
Providers check each linked domain against domain blocklists, such as URL and domain block lists, and against their own reputation data. A clean sending domain does not protect a message that links to a domain with a bad history. This is a common failure when a sender uses a shared tracking domain that other customers have abused.
Link shorteners and redirects
Public URL shorteners hide the real destination, and spammers use them for that reason. Shared shorteners also carry the reputation of every user on them. Long redirect chains add delay and look like attempts to hide a destination. Use your own domain for links where you can, and keep redirects to one hop.
Mismatched link text
This HTML shows visible text that points to one site while the link goes to another:
<a href="https://tracker.example.net/c/9f3a">https://www.example.com/account</a>Phishing messages use this pattern, so filters treat it as suspicious. Make the visible text honest, or use descriptive text such as "View your account".
Branded tracking domains
Click and open tracking usually works by rewriting links to point at a tracking domain. If that domain belongs to your email provider and is shared, your messages inherit its reputation. A branded tracking domain is a subdomain of your own domain, such as links.example.com, set up with a CNAME record to the provider:
links.example.com. IN CNAME tracking.esp.example.net.The hostnames here are placeholders. Your provider documents the real target. A branded domain ties link reputation to you, which helps when your behavior is good and hurts when it is not.
Formatting
Text and HTML together
Send a multipart message that contains both a plain-text part and an HTML part. A message with only HTML, or only a single large image, is less common in legitimate mail and gives filters less to read.
Image-to-text balance
A message made of one large image with almost no text hides its content from text analysis. Spammers used this method for years to evade filters. Keep real text in the message and give images short alt text.
HTML quality
- Close all tags and keep the markup valid.
- Avoid hidden text, such as white text on a white background.
- Avoid JavaScript, embedded forms, and
<iframe>elements. Mail clients block most of them, and filters treat them as risky. - Keep the message size reasonable. Gmail clips messages with HTML over about 102 KB in the inbox view, which can hide your footer and unsubscribe link.
Visual style
Excessive capital letters, repeated exclamation marks, and large colored fonts match spam patterns. These features carry little weight alone. They add up when combined with other weak signals.
Headers and identity consistency
Content checks include consistency between the identity fields in a message. Make these agree:
- The visible From domain matches the domain that passes DKIM or SPF alignment under DMARC.
- The Reply-To address, if present, belongs to a domain you control.
- The display name does not imitate another brand or person.
- The message includes a real physical or postal address if your local law requires one for commercial mail.
A mismatch is a sign of spoofing. It can also push an otherwise acceptable message toward spam.
Attachments
Attachments carry more risk than links. Providers block or quarantine executable files, script files, and many archive types. Password-protected archives are often blocked because scanners cannot inspect them. For marketing and transactional mail, link to a hosted file instead of attaching it. When an attachment is needed, prefer PDF and keep it small.
Content consistency across your mail
Filters compare each message against what they have seen from you. A sudden change can lower trust even when the new content is acceptable. Examples include a new template with a different link domain, a switch from text to image-heavy design, or a first campaign that promotes a product unrelated to earlier mail.
Test major changes on a small segment before a full send. This is also useful because it shows the effect on engagement, which feeds back into reputation.
Myths about content
Several beliefs about content are common and mostly wrong.
- "Spam trigger word lists decide placement." Models weigh patterns across the whole message. Avoiding a list of words does not fix a reputation problem. Writing misleading text does hurt, because it also raises complaints.
- "A content score from a testing tool predicts inbox placement." A tool can find real defects such as broken HTML or a blocklisted link. It cannot see your reputation at each mailbox provider, so a good score does not guarantee delivery.
- "Tracking pixels cause spam placement." Tracking pixels are normal. The risk comes from the tracking domain's reputation, not from the pixel.
A pre-send content check
This Python sketch checks a few structural points before sending. It parses an HTML body, flags links whose visible text names a different domain than the target, and checks that a plain-text alternative exists.
from html.parser import HTMLParser
from urllib.parse import urlparse
class LinkChecker(HTMLParser):
def __init__(self):
super().__init__()
self._href = None
self._text = []
self.mismatches = []
def handle_starttag(self, tag, attrs):
if tag == "a":
self._href = dict(attrs).get("href")
self._text = []
def handle_data(self, data):
if self._href is not None:
self._text.append(data)
def handle_endtag(self, tag):
if tag == "a" and self._href is not None:
text = "".join(self._text).strip()
if text.startswith("http"):
shown = urlparse(text).hostname
actual = urlparse(self._href).hostname
if shown != actual:
self.mismatches.append((text, self._href))
self._href = None
def check_message(html_body, text_body):
problems = []
checker = LinkChecker()
checker.feed(html_body)
for shown, actual in checker.mismatches:
problems.append(f"link text {shown} points to {actual}")
if not text_body.strip():
problems.append("no plain-text alternative")
return problems
html = '<a href="https://tracker.example.net/c/9f3a">https://www.example.com/account</a>'
print(check_message(html, ""))Running it prints two problems: one for the mismatched link and one for the missing plain-text part. A check like this finds defects. It does not measure reputation.
Summary of practical rules
- Authenticate every message and align the From domain.
- Link only to domains with a clean history, and use branded tracking and link domains.
- Send both plain-text and HTML parts.
- Keep real text in each message and keep the HTML valid and small.
- Make link text, subject lines, and sender names truthful.
- Test large template or link changes on a small segment first.
- Treat content testing tools as defect finders, not placement predictors.
Exercise
A sender's campaign lands in spam at one mailbox provider. Authentication passes, complaint rate is low, and the list is clean. The only change from the previous campaign is that all links now go through a free public URL shortener. What is the most likely cause, and what should the sender do?
Show answer
The shortener is the likely cause. Public shorteners hide the destination and share the reputation of every user, and spammers use them heavily, so the linked domain may be blocklisted or distrusted even though the sender's own domain is fine. The sender should replace the shortener with links on a branded domain they control, keep redirects to one hop, and send the next campaign to a small segment first to confirm placement recovers.
Exercise
Why is a "spam score" from a content testing tool not a reliable prediction of inbox placement, and what is it still good for?
Show answer
The tool analyzes only the message. Placement also depends on the sender's domain and IP reputation, engagement history, and authentication at each provider, which the tool cannot see. It is still useful for finding concrete defects, such as broken HTML, a missing plain-text part, mismatched link text, or a linked domain on a blocklist.