Guide

Whitelisting a Domain in Gmail, Microsoft 365 and cPanel

Learn whitelisting a domain in Gmail, Microsoft 365 and cPanel, plus the safer checks that stop spoofed email from getting through.

Gopi Krishna Lakkepuram · Founder & CEO

· 12 min read

Your booking confirmations keep landing in spam, or the contact form throws an error the second someone hits submit. The owner looks at you and says the same thing: just whitelist the domain. That request sounds like one checkbox. It is not.

Whitelisting a domain can mean a mailbox filter, a company-wide anti-spam rule, a hosting spam list, a firewall allow rule, or a browser origin list. Each control trusts a different thing, and the wide option is usually the one that causes trouble later. I would start by naming the failure in front of you. Mail that should have arrived is a mail-platform problem. A form, chat widget, or booking tool that fails in the browser is an origin problem. Mixing those two wastes an afternoon and can leave forged mail sitting in the inbox.

Table of Contents

Find the Right Whitelist Before You Change Anything

Say a clinic's appointment reminders vanish into junk, and the same week the website chat won't load on a new booking page. Both complaints get the same request, whitelist the domain, but they are not the same job.

A spam filter trusts a sender address or a domain name written in a message header. A firewall trusts an IP address, a port, and a protocol. A browser trusts a full origin, which is the scheme, the hostname, and the port together. An address is one mailbox. A domain is every mailbox on that name. An IP is a machine. An origin is one exact web address the browser is allowed to talk to.

You'll meet six places in day-to-day work.

Platform Where the setting lives What it trusts Scope
Personal Gmail Settings > See all settings > Filters and Blocked Addresses Sender address or domain in a filter Your mailbox only
Google Workspace Admin console > Apps > Google Workspace > Gmail > Spam, Phishing and Malware Sender address, domain or IP Organization-wide
Microsoft 365 Defender portal > Threat policies > Anti-spam > Allowed senders and domains Sender address or domain Tenant-wide policy
cPanel hosting Email > Spam Filters > Allow list Address or domain Mailboxes on that account
Firewall Allow rule for an IP or hostname IP address, port and protocol Network traffic
Browser integrations (CORS) Server-side origin allowlist Full origin: scheme, host and port Browser requests to your API

Personal Gmail only changes one inbox. Google Workspace and Microsoft 365 change policy for the whole company, so a sloppy entry reaches every user. cPanel covers the mailboxes on that hosting account, not your Microsoft tenant. A firewall rule never fixes spam, and a CORS list never delivers email.

Practical rule: Mail complaints start in the mail platform. Browser or form failures start with the server's origin list, not with email settings.

Match the symptom to one row before you click anything. If invoices miss the inbox, you are in Gmail, Workspace, Microsoft 365, or cPanel. If a widget fails only in the browser, you are on the last row.

Why Narrow Trust Beats Domain-Only Allowlists

A domain sitting on an allowlist is not proof that a message is genuine. Spoofers borrow the trusted name, and a bare domain entry can skip spam filtering plus the checks that would have caught the fake. That is the shortcut I would not take, even when the owner is waiting on a missing invoice.

The scale of the problem is easy to underestimate. Infosecurity Magazine, citing EasyDMARC research, reported that more than 90% of the world's top email domains remained vulnerable to spoofing in 2025. The same tracking showed more than 7.2 million domains had published a DMARC record by early 2025, which still leaves a huge set of domains with no such policy at all. Approving a name does not mean that name can prove who sent the mail.

A comparison chart showing why narrow trust is better than domain-only allowlisting for email security systems.

Three ways a wide entry fails

Wildcard coverage. An entry for every subdomain also covers the staging site someone forgot, the old marketing microsite, and any host an attacker can stand up under that name.

Shared hosting. One tenant's name can sit beside unrelated tenants on the same platform. Trusting the platform's domain trusts strangers you never contracted with.

Vendor churn. A marketing or SaaS sender switches mail providers without telling you. You then get delivery gaps, or you widen the rule until it covers infrastructure you never reviewed.

What the narrow pattern actually requires

The steps in the platform sections rest on three ideas, and they are not optional if the entry will outlive this afternoon.

  • Exact sender first. Trust billing@ that vendor, not every address on the domain, unless you receive mail from many of them.
  • Authenticated mail before any exception. SPF, DKIM, and DMARC should already pass. An allow rule is a last resort, not a substitute for those records.
  • An owner, a purpose, and a review date. Write down who asked, why the mail matters, and when you will look again.

"This sender may reach us" is not the same sentence as "this message is authenticated."

A stale entry keeps access alive after a vendor, an employee, or a website environment has gone. Review is part of the control, not a nice extra. Kaspersky reported that its security solutions blocked 554,002,207 attempts to follow fraudulent links in 2025. A trusted name in the inbox is one of the easier ways those links get a click.

How to Allow a Domain in Gmail and Google Workspace

Personal Gmail and Google Workspace look similar in the menus and behave very differently in blast radius. Do the mailbox filter when one person is missing mail. Touch the admin console only when the whole company needs the same sender.

A step-by-step infographic illustrating how to allow a specific email domain in Gmail and Google Workspace settings.

Personal Gmail

  1. Click the gear icon and choose See all settings. You are creating a filter, because Gmail has no button labeled whitelist.
  2. Open Filters and Blocked Addresses and select Create a new filter. Future mail is what this rule will see, so mail already in Spam stays there until you move it by hand.
  3. In From, enter the exact address when you can. Use @example.com only when several people at that company must reach this one mailbox. Click Create filter.
  4. Tick Never send it to Spam and save. That choice keeps matching mail out of Spam. It does not prove the sender is real, and it does not apply to anyone else's inbox.

The filter starts with the next message, so send a fresh test rather than hunting yesterday's copy.

Google Workspace admin

  1. Sign in to the Admin console and go to Apps > Google Workspace > Gmail > Spam, Phishing and Malware. This path is organization-wide, so a domain here is a company decision, not a personal preference.
  2. Add the exact sender when one billing address is all you need. Add the domain only when many addresses at that company must reach every user. The common slip is pasting the whole domain because it was faster to type.

A short walk-through of the personal filter path is worth watching once before you touch a shared mailbox.

Check the result

Open a new message from that sender, choose Show original, and confirm SPF, DKIM, and DMARC each show pass. Success is three things together: the message sits in the inbox, authentication passes, and you have written the entry down with a named owner. If authentication fails, fix the sender's records before you widen the filter. A pass on a forged test means the entry is too wide and should come back out.

How to Allow a Domain in Microsoft 365 and Exchange

Microsoft 365 is where a casual domain entry does the most damage, because the policy is tenant-wide and it can step around the checks you think are still running.

A professional IT administrator works on a laptop, adding a trusted domain to an email anti-spam policy.

Microsoft's guidance on safe sender lists states that allowed-domain entries bypass most protection and create a high risk of malicious delivery. A domain-only allow rule can let attackers spoof the trusted domain, bypass spam filtering, and evade SPF, DKIM, and DMARC checks. Microsoft advises avoiding those lists where possible.

Work the policy in this order

  1. Open the Microsoft Defender portal, then Email & collaboration, Policies & rules, Threat policies, and Anti-spam. Edit the inbound anti-spam policy, not a random transport rule someone built years ago.
  2. Under Allowed senders and domains, add the exact sender address first. Add a domain only when the sender cannot be pinned to a single address, and even then pair it with the known sending infrastructure rather than the name alone.
  3. Before you save, inventory that sender's legitimate domains, mail provider, and outbound addresses, then confirm SPF authorization, DKIM signing and alignment, and a DMARC policy. Prefer p=reject. Properly authenticated mail often needs no allow rule at all.
  4. If the exception is unavoidable, keep malware and phishing inspection on, and set an expiration or review date in your own tracker. The policy screen will not retire the entry for you.
  5. Validate in a test mailbox with one legitimate message and one forged message that uses the same domain. Open Authentication-Results on both. Watch quarantine, impersonation, and spoof-intelligence events for at least one full mail cycle, such as a month of invoices.

What individual users can do

In Outlook, a person can add a single address to Safe Senders. That is narrower than a tenant entry and it is the right tool when only one employee is missing a newsletter. Do not promote that personal fix into a domain allow for the whole tenant just to stop the tickets.

A marketing platform that changes mail providers is a common failure here. The old entry either blocks the new mail or, if you guessed wide, trusts infrastructure you never documented. Inbox placement is not the success measure. Every approved message should pass authentication and come from a source you wrote down, while the forged copy stays blocked.

Setting Up Allowlists in cPanel, Firewalls and Email Clients

These four controls get lumped together because people use one phrase for all of them. The clicks are not interchangeable, and a win in one place does nothing for the others.

cPanel

Log in, open Email > Spam Filters, and find the Allow list or Whitelist section. The label shifts by version. Add the exact address, or the domain if several mailboxes at that sender must get through, and save. The change covers mailboxes on that hosting account only. It does not touch Microsoft 365 or Gmail, so do not close the ticket until you know which system received the complaint.

Firewalls

Create an allow rule for the specific IP or hostname, and set the port and protocol in the same rule. Permitting HTTP and HTTPS together is a common mistake, because you just opened a second service you did not mean to trust. On a server that should accept only a partner's traffic, allow that partner's fixed address on TCP port 443 only, then send a test and confirm other ports stay closed. NIST's application whitelisting guidance treats allowlisting as authorization of specific applications and components, and its cloud access-control guidance points to network-boundary controls such as ACLs. That is explicit, component-level permission, not a broad name exception. Test in audit or monitor mode first, drop destinations nobody owns, then enforce with logging and a way to roll back.

Outlook on the desktop

Right-click the message, choose Junk, then Never Block Sender's Domain. Check that the same sender is not also on a block list, or the block wins and you will think the allow failed. Prefer Never Block Sender when one address is enough. A domain choice here still only affects that Outlook profile, but it is wider than it needs to be for a single billing contact.

Browser integrations

A browser sends an Origin header. Your server should compare that full value with a fixed list. The OWASP CORS cheat sheet says to compare the request's full Origin against a fixed allowlist, and it warns against trusting all subdomains, because an XSS flaw on any allowed subdomain can expose cross-origin responses. MDN makes the same point: allow the minimum origins and resources, since a broad policy can let other sites read data.

https://app.example.com:443 is a different origin from example.com. Allow the exact one the widget uses. Give staging and each customer subdomain their own entries, and delete them after a migration. CORS is a browser permission. It does not authenticate the visitor, so your server still has to decide who may act.

If you are placing a chat widget, the same habit applies on the product side. Our domain allowlisting steps for the website chat are where you name the site that may load it, including a localhost entry while you test, instead of trusting every host under the company name.

Test the Change and Schedule Your Review

An entry that exists is not an entry that works. Run both messages before you tell the owner the problem is fixed.

A checklist for testing domain whitelisting changes, including sending real and forged messages, checking authentication, and scheduling reviews.

  1. Send one legitimate message from the exact sender, and one forged message that uses the same display name and domain. The legitimate one should arrive. The fake one should not.
  2. Open the headers on each and read Authentication-Results for SPF, DKIM, and DMARC. You want pass on the legitimate message. A pass on the forged one means the exception is doing too much.
  3. Watch quarantine and impersonation reports for at least one full billing or booking cycle. Monthly invoices and reminder mail are where a bad provider change shows up, not in the test you sent today.
  4. If something fails, match it to the table below before you add another exception. A second allow rule on top of a broken one usually makes the hole bigger.
  5. Review every quarter, and again right after a vendor, DNS, or hosting change. Remove any entry whose owner cannot be named.
Symptom Likely cause Fix
Allowed sender still lands in spam Only the domain was added, or the sender uses a new mail provider Add the exact sender address and confirm SPF, DKIM and DMARC pass
Forged mail from the domain gets through A domain-only allow rule bypasses authentication Remove the domain entry and keep only the exact-address exception
Form or chat widget fails in the browser The full origin is missing from the CORS allowlist Add the origin with scheme and port, not just the domain
Real mail blocked after a DNS or vendor change The sending IP or provider changed Update the sender inventory and review the entry

The checklist worth copying

Put this on the ticket before you close it.

  • Owner named. A person, not "IT" or "the vendor."
  • Exact sender recorded. Address first, domain only with a written reason.
  • Authentication passing. SPF, DKIM, and DMARC on the actual message.
  • Forged mail blocked. Same display name, same domain, still rejected.
  • Review date set. Quarterly, plus the next time that vendor changes platforms.

If you cannot name the owner, delete the entry. An allowlist with no owner is how last year's contractor still reaches the inbox.

That list is the decision, not the menu path. The path only creates the exception. The checklist is what tells you it is still safe to keep.


If you are adding a website chat beside these mail and origin rules, Hyperleap AI lets a small business capture leads, answer questions, and book appointments from the site without a custom build. You paste your website, check a few answers, and add one script tag, and the same narrow-allow habit applies to which site may load the assistant. Visit Hyperleap AI when you are ready to put that chat on the site you own.

Written by

Gopi Krishna Lakkepuram

Founder & CEO

Gopi leads Hyperleap AI with a vision to transform how businesses implement AI. Before founding Hyperleap AI, he built and scaled systems serving billions of users at Microsoft on Office 365 and Outlook.com. He holds an MBA from ISB and combines technical depth with business acumen.

Published November 26, 2026

Explore Hyperleap AI

An AI front desk that answers customer questions, collects contact details, and books appointments on your website and messaging channels.