The basics of email subdomains

Get the scoop on what email subdomains are and how to properly use them. Read more...



When it comes to email sending, sometimes you need more than the press of a button to get your message across. You may have heard of email subdomains, but you may be wondering - how do you use them? Do they have anything to do with email deliverability? And, wait a minute, what exactly are they?

Well, have no fear, because we’re going to use this post to tell you all about email subdomains and why you need them. It’s everything you ever wanted to know about subdomains but were afraid to ask. Now, let’s get started.

What is a subdomain?

To explain what a subdomain is you first need to understand what domains are.

A domain is a unique, human-readable way of identifying a website. Often, this is referred to as the parent domain or the root domain. Right now, you’re on the domain Behind the scenes, the domain name is connected to a unique IP address through DNS records, but memorizing a set of four numbers is a lot harder than remembering the name Because of that, the human-readable way is used for identification purposes. You’re going to need that.

A subdomain is a prefix that comes before the root domain. Subdomains are often used on websites to send traffic to a different IP address while still keeping users on the same root domain. For example, Mailgun hosts our developer documentation on a separate service, so we use a documentation subdomain,

That’s great, but how does this relate to email?

What’s the difference between an email domain and an email subdomain?

Email domains are the most common way that people send and receive emails in a professional way. Your business looks a lot more professional with a domain instead of an or address. Many businesses prefer to use their root domain, or main domain, for professional emails because it’s a way to easily verify the email is sent from the company.

For example, Mailgun’s professional emails are all sent from

An email subdomain delivers email from the subdomain instead of the root domain. Here’s an example: is the subdomain that Mailgun uses to send marketing messages. Every user that signs up for a Mailgun account gets a welcome email from Sam, sent from that address. 

Why should you use an email subdomain?

Inbox providers like Gmail and Yahoo care about email reputation, which is a grade for how well users interact with your emails. If Gmail sees that their users are highly engaged with your emails, it’s highly likely that you’re following email best practices, and therefore have a positive sender reputation. But if users are sending negative signals to Gmail, like marking your email as spam, then that’s bad.

Your email reputation is based on both domain reputation and IP address reputation. We wrote more about email reputation in a separate post, but the important part here is that subdomains have a different reputation than their root domains.

This is a good thing - otherwise, the reputation of your email marketing campaigns could affect whether potential customers receive emails from your sales team. Imagine if none of your business emails were delivered to the inbox!

This is exactly why Mailgun recommends all customers use a subdomain when sending through our service. 

Best practices for using a subdomain

Using subdomains is easier than you may think. Many of our customers separate their marketing emails from their transactional emails through subdomains, which means they set up at least two separate subdomains to send different types of emails. This sounds complicated, but it’s actually super easy. Later on, we’ll walk you through how to set up a Mailgun subdomain step-by-step. Here’s an example domain setup for a fake company, Meowgun.

Meowgun is a professional company that wants to send business emails from their domain. They’ve configured it with Google Workspace and set up the proper DNS records.

Meowgun also wants to send a cat-facts email newsletter, and a password reset email to their users. Here are the domains they added to Mailgun:



Note: The names of your subdomains don’t matter in terms of email reputation, so use whatever makes sense for you. It helps to be as clear as possible to avoid any confusion with your users.

Meowgun hires an intern to manage their newsletter, and they accidentally send an email blast to a segment of unengaged users. As a result, their Gmail reputation decreases. 

But because Meowgun’s newsletter sends through a separate email subdomain,’s reputation is unaffected -  and their employees continue sending and receiving email without any inboxing problems. It sounds like their intern should read about email best practices before sending the next cat-facts newsletter, though. 

How to use an email subdomain in Mailgun

Adding a subdomain to Mailgun is easy! Here’s what you do:

  1. Login to Mailgun and navigate to ‘Sending’ in the left-hand menu

  2. Click the green ‘Add New Domain’ button in the top right corner of your screen. Note: You must add a credit card to your Mailgun account before you’re allowed to add custom domains. If your button is greyed out, then you need to add a credit card before moving on

  3. Click ‘Add Domain’

  4. On the next screen Mailgun provides you with some DNS records to add to your domain. MX Records, SPF Record, DKIM Records

Once you’ve added your DNS records and they’ve been verified by Mailgun, which can take up to 48 hours, you’re good to go!

MX records are recommended for all domains, as they’re a verification step commonly used by ISPs. They are also required if you want to receive email at the same subdomain you added to Mailgun.

Check out this help article about using Mailgun with a Google Workspace account

Wrapping up

Now that we’ve covered what an email subdomain is, why they’re important for you as an email sender, and how to set one up for Mailgun, you’re ready to send some emails. Hopefully, all your questions have been answered, and you aren’t afraid to ask anything else. Onto the next mystery! Happy sending!

There’s a lot more to email than hitting send. To learn more about using email subdomains, email authentication, and other deliverability issues, check out our deliverability services.

Learn about our Deliverability Services

Deliverability Services

Looking to send a high volume of emails? Our email experts can supercharge your email performance. See how we've helped companies like Lyft, Shopify, Github increase their email delivery rates to an average of 97%.

Related readings

The basics of SPF records

SPF doesn’t refer to how long you can wait before you have to reapply your sunblock (seriously, go get some). Instead, the term “SPF” refers to a security measure that helps...

Read more

What is DKIM: Learn how it works and why it’s necessary

Are you who you say you are, or are you a spoofer in disguise? Answering this question is what DKIM is all about. As email usage and capabilities continue to grow, it’s important to...

Read more

How to implement DMARC – A step-by-step guide

Email spoofing is rampant across the internet. Fraudulent emails come in the form of scams, ransomware, and even stock-market manipulation. We see companies lose...

Read more

Popular posts

Email inbox.

Build Laravel 10 email authentication with Mailgun and Digital Ocean

When it was first released, Laravel version 5.7 added a new capability to verify user’s emails. If you’ve ever run php artisan make:auth within a Laravel app you’ll know the...

Read more

Mailgun statistics.

Sending email using the Mailgun PHP API

It’s been a while since the Mailgun PHP SDK came around, and we’ve seen lots of changes: new functionalities, new integrations built on top, new API endpoints…yet the core of PHP...

Read more

Statistics on deliverability.

Here’s everything you need to know about DNS blocklists

The word “blocklist” can almost seem like something out of a movie – a little dramatic, silly, and a little unreal. Unfortunately, in the real world, blocklists are definitely something you...

Read more

See what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending
CTA icon