Improve Email Deliverability on Hosting to Prevent Spam

Email Deliverability refers to the ability of your emails to reach the recipient's inbox successfully without being flagged as spam, rejected by mail servers, or filtered into the junk folder. In this comprehensive guide, you'll learn practical techniques to improve email deliverability on hosting platforms like AsiaGB, including how to configure SPF, DKIM, and DMARC records, verify your server reputation, and follow email best practices that actually work.

Understanding Email Deliverability and Why It Matters

Email Deliverability is a critical metric for any web business. When an email you send gets rejected or lands in someone's spam folder, your important messages—account confirmations, password resets, order receipts, or support responses—never reach the intended recipient. The user then assumes your service is broken, leading to lost trust and potential customer churn.

Think of Email Deliverability as a multi-checkpoint security process. When your hosting server sends an email, the recipient's mail server performs several automatic checks: Is this sender authorized to send from this domain? Has this server IP been reported for spam before? Does the email content look suspicious? Is there a valid digital signature? Each check contributes to a reputation score that determines whether the email gets accepted, quarantined, or rejected outright.

Approximately 85% of deliverability problems stem from five controllable factors: authentication configuration (SPF/DKIM/DMARC), sender IP reputation, email headers, email content quality, and bounce rates. Master these, and you'll see a dramatic improvement in your email reaching the inbox.

Key Factors Affecting Email Deliverability Performance

Email Deliverability depends on several interconnected elements working in harmony. Understanding each helps you identify and fix problems systematically:

Configure SPF Records for Sender Authorization

SPF (Sender Policy Framework) is the foundational authentication mechanism. It's a simple DNS text record that tells receiving mail servers: "These IP addresses are authorized to send email on behalf of my domain."

When a mail server receives an email claiming to be from yourdomain.com, it queries the SPF record in your domain's DNS. If the sender's IP matches the list of authorized IPs, the email passes SPF authentication. If not, it fails, and the receiving server can apply a policy (reject, quarantine, or flag as suspicious).

Example SPF Record for DirectAdmin Hosting:

v=spf1 a mx include:hosting.asiagb.com ~all

Meaning: v=spf1 (SPF version 1) | a (authorize this domain's A record) | mx (authorize MX servers) | include:hosting.asiagb.com (include ASIAgb's mail servers) | ~all (soft fail for others—accept emails from unauthorized IPs but mark them)

Steps to Set SPF in DirectAdmin:

  1. Log in to DirectAdmin control panel
  2. Navigate to DNS Management or Zone Editor
  3. Look for existing SPF records (search for "v=spf1")
  4. If none exists, add a TXT record with: v=spf1 a mx ~all (simplest safe option)
  5. Allow 15-30 minutes for DNS propagation
  6. Verify using MXToolbox SPF Checker tool

⚠️ Important: SPF syntax is strict. One typo breaks the entire record, and receiving servers will ignore it. Always verify using MXToolbox before trusting production. Common mistakes: forgetting "v=spf1" at the start, mismatched domain names in includes, or mixing up soft-fail (~) and hard-fail (-).

Implement DKIM Signatures for Email Authentication

DKIM (DomainKeys Identified Mail) takes authentication a step further by adding a cryptographic signature to each outgoing email. Unlike SPF which only verifies sender IP, DKIM proves the email content hasn't been altered during transmission—a critical defense against spoofing and man-in-the-middle attacks.

DKIM works by generating a public/private key pair. The private key stays on your mail server and signs every outgoing email. The public key goes into your DNS as a TXT record. When receiving servers get your email, they fetch the public key from your DNS and verify the signature mathematically. If someone tampers with the email body in transit, the signature fails verification.

Enabling DKIM on DirectAdmin (Exim Mail Server):

  1. Log in to DirectAdmin
  2. Go to Mail Management → DKIM Management
  3. Select your domain and click "Enable DKIM"
  4. DirectAdmin generates a keypair and displays the public key (usually very long, 200+ characters)
  5. Copy the public key and add it to your DNS as a TXT record:
    • Record name: default._domainkey.yourdomain.com
    • Value: (the public key DirectAdmin shows)
  6. Wait 15-30 minutes for DNS propagation
  7. Test with MXToolbox DKIM Checker or Gmail's Email Header Analyzer

Once DKIM is active, every email from your server will include an authentication header. Receiving servers automatically verify it, and legitimate emails gain a significant reputation boost compared to unsigned emails.

Establish DMARC Policy for Domain Protection

DMARC (Domain-based Message Authentication, Reporting & Conformance) is the policy layer that ties SPF and DKIM together. It tells receiving mail servers: "If SPF or DKIM fail for emails claiming to be from my domain, here's what you should do—and send me reports about it."

DMARC protects your domain from impersonation. Without DMARC, fraudsters can spoof your domain in the From header (looking to recipients like genuine emails), and there's no policy telling receivers to block them. With DMARC, you can enforce that only emails passing your authentication checks are accepted.

Example DMARC Record (Recommended):

v=DMARC1; p=quarantine; rua=mailto:[email protected]; ruf=mailto:[email protected]

Breakdown: v=DMARC1 (DMARC version) | p=quarantine (fail emails go to spam, not rejected) | rua (aggregate report destination) | ruf (forensic report destination for samples of failing emails)

Three-Phase DMARC Rollout (Recommended Best Practice):

Optimize Email Headers for Maximum Deliverability

Email headers are metadata fields that receiving servers inspect to make routing and filtering decisions. Improperly formatted headers are one of the quickest ways to trigger spam filters or mail rejection.

Critical Headers You Must Control:

Example PHP Code for Proper Email Headers:

<?php
// Define sending address (must be on your domain)
$from = '[email protected]';
$to = '[email protected]';
$subject = 'Account Confirmation';
$message = "Please confirm your account...";

// Properly formatted headers
$headers = array(
    'From: ' . $from,
    'Return-Path: ' . $from,
    'Message-ID: <' . time() . '@' . $_SERVER['SERVER_NAME'] . '>',
    'Reply-To: [email protected]',
    'X-Mailer: PHP/' . phpversion(),
    'MIME-Version: 1.0',
    'Content-Type: text/plain; charset=UTF-8',
    'Content-Transfer-Encoding: 8bit'
);

// Send mail with proper headers
mail($to, $subject, $message, implode("\r\n", $headers));
?>

Notice: header values separated by "\r\n" (not "\n" alone), charset explicitly set to UTF-8, and MIME-Version included. These small details make a measurable difference in acceptance rates.

Prevent Emails from Landing in Spam Using Best Practices

Beyond technical configuration, email content and sending practices dramatically affect deliverability. Here's what actually works:

Use Professional Tools to Monitor Email Deliverability

Guesswork won't cut it. Use industry-standard tools to verify your setup and catch problems before they hurt your business:

Tool What It Checks URL
MXToolbox SPF, DKIM, DMARC, IP blacklists, MX records, DNS mxtoolbox.com
Google Postmaster Tools Gmail delivery, IP reputation, user complaints, authentication postmaster.google.com
Mail-tester.com Spam score (0-10), email header analysis, filtering rules mail-tester.com
250ok Inbox placement testing across ISPs 250ok.com
Gravatar Author photo/avatar for emails (optional but improves reputation) gravatar.com

How to Use These Tools: MXToolbox is your first stop—run SPF, DKIM, DMARC checkers to verify configuration. Mail-tester is excellent for testing individual emails (it assigns a spam score 0-10, with 10 being perfect (inbox-ready) and lower scores indicating spam risk). Google Postmaster Tools requires you verify domain ownership but gives invaluable insight into how Gmail—the world's largest email platform—sees your reputation.

Choose Hosting That Fully Supports Email Deliverability

Your hosting provider's infrastructure directly impacts email success. Look for these features:

AsiaGB Hosting includes all these features. Customers get full DirectAdmin access, automatic DKIM setup, DNS management for SPF/DMARC, and 99% uptime SLA with SSD storage, starting from just 500 THB/year. This foundation ensures your emails have the best possible chance of reaching inboxes.

Hosting Built for Email Deliverability

AsiaGB Hosting includes full DirectAdmin email tools, DKIM management, SPF/DMARC support, and 99% uptime guarantee. Perfect for web applications that rely on reliable email delivery. Starting at 500 THB/year.

Get Started with AsiaGB

View all cheap Thailand web hosting plans →