How to Add MX Records on Hostinger (Email Routing Guide)

A complete walkthrough for gathering your email provider's MX records, adding them in Hostinger, and confirming your domain's email is routing correctly.

Writer: Jack Wallen

Editor: Britain Simons

Reviewer: Cristian Lopez

Disclosure: When you purchase through links on our site, we often earn referral fees from partners. For more information, see our ad disclosure and review policy.

Advertiser Disclosure

HostingAdvice.com is a free online resource that offers valuable content and comparison services to users. To keep this resource 100% free, we receive compensation from many of the offers listed on the site. Along with key review factors, this compensation may impact how and where products appear across the site (including, for example, the order in which they appear). HostingAdvice.com does not include the entire universe of available offers. Editorial opinions expressed on the site are strictly our own and are not provided, endorsed, or approved by advertisers.

Our Editorial Review Policy

Our site is committed to publishing independent, accurate content guided by strict editorial guidelines. Before articles and reviews are published on our site, they undergo a thorough review process performed by a team of independent editors and subject-matter experts to ensure the content’s accuracy, timeliness, and impartiality. Our editorial team is separate and independent of our site’s advertisers, and the opinions they express on our site are their own. To read more about our team members and their editorial backgrounds, please visit our site’s About page.

Follow Us:
2.7k
16.4k
14.1k
200
4.1k

You might not believe this, but the process of sending and receiving email is actually much more complex than you think. There are a lot of moving parts to email, and all of those parts have to adhere to SMTP (Simple Mail Transport Protocol) routing.

One of those layers is called the MX record, or Mail Exchange record. MX records serve as a fundamental piece of the DNS (Domain Name System) protocol, which handles moving email back and forth across the internet. It’s the magic behind the curtain.

Without MX records, that rehearsal schedule you sent out to the cast of the show you’re directing wouldn’t make it, or that chocolate chip cookie recipe you sent to your daughter would hang in limbo. I’ve set up many an email server in my life, and almost every time there were delivery issues, the problem was a malformed or forgotten MX record.

MX records make it possible to create advanced configurations for larger organizations. They also make it possible to provide essential security features to help protect from malicious emails. You can even route email across multiple email servers, while retaining a single presence (e.g., your business domain).

In this tutorial, we’ll walk through how to add, edit, and verify MX records in Hostinger’s DNS Zone Editor, while also avoiding common email routing issues.

Step 1: Gather Your Email Provider’s MX Records

Before touching Hostinger’s DNS Zone Editor, you need your email provider’s exact MX records. These come from whoever hosts your email: Google Workspace, Microsoft 365, Proofpoint, or another provider.

If you’re not already using Hostinger for website hosting, now is the perfect time:

Pick Your Hostinger Plan

30-day money-back guarantee
Free domain for 1 year
WordPress sites maintained for you
Drag-and-drop website builder
Free SSL and Weekly auto backups
Free Email marketing for 1 year
Premium
$2.69/mo
(78% off)
Business
$3.59/mo
(81% off)
Cloud Startup
$7.19/mo
(74% off)

MX Records are the standard across the internet. You have two ways to find them. Whichever you pick, you’re after the same three pieces of information: the mail server hostname, its priority, and its TTL.

Option 1: Free MX Lookup Tool

Sites like Google Admin Toolbox, Dig, and MxToolbox let you type in your domain and return your MX records instantly. Once you choose “MX” in Google Admin Toolbox Dig, for instance, you can also toggle “Raw View,” and the result will look almost identical to the terminal option.

Look for these three columns in the results:

Ignore the extra diagnostics these tools show, like DMARC status or blacklist checks. They’re useful for other purposes, but not what this step needs.

Other tools, like DNS Checker, only display the mail server hostname and skip priority and TTL entirely; if you use one of those, you’ll need the terminal method below (or your provider’s documentation) to get the complete record.

Option 2: Terminal

The command line is just as simple to use on your computer as the above tools. Neither method requires much technical knowledge, even if you’ve never opened the terminal in your life.

Let’s use example.com as our domain. Locate the MX records on Windows. Open the terminal app and issue the command:

nslookup -query=mx example.com

If you’re using either Linux or macOS, the command would be:

dig example.com MX

If your provider set up email on a “mail.” subdomain, query with “mail.example.com” instead. Otherwise, most domains keep their MX records on the root domain, so just use “example.com,” the same way you’d type it into a browser.

The output should be formatted the same and will include a line like:

example.com. 6763 IN MX 0 example.com.

Again, instead of “example.com”, you’ll see your domain in the output.

Let me explain what each bit of information means:

It’s important to understand that every email provider supplies its own MX records along with priority settings, and you cannot change them. The mail server hostname and its priority number are what carry forward into Step 3’s form fields. The record class and type (IN, MX) only confirm the record itself. You won’t need to re-enter these values.

A third option is to simply contact your provider and ask for that information.

You should also check the documentation for your email service provider to see if you’ll need additional DNS records alongside your MX records. This is often required to ensure your emails are authenticated, trusted by spam filters, and delivered successfully.

Once you have that information, you’re ready to access the Hostinger DNS Zone Editor.

Step 2: Open the DNS Zone Editor

To add a DNS record in Hostinger, you’ll want to access the DNS editor, which can be found within hPanel (Hostinger’s answer to cPanel). To access that section, log in to your Hostinger account with your credentials (username/password).

On the dashboard, look for the VPS section near the bottom of the right panel, where your server will be listed. Click the Manage button for that server.

If you are on shared hosting (most common for small businesses), then simply locate your “DNS” records by searching in the top search bar, or from your dashboard, click Domains > Manage > DNS or Nameservers section on the left.

You should end up on the resulting page, with DNS Manager near the left sidebar.

You will then find yourself in the DNS Manager for your VPS server or DNS records for shared hosting. You should see a section listed under Domain Name in the right panel. You are looking for the domain name, nameservers, and status.

The listing of your domain name will include the primary and secondary addresses for DNS, as well as the status of those servers (they should be listed as “Active”). If the servers are listed as Inactive, you’ll need to either consult your hosting provider or double-check to ensure you’ve spelled the DNS servers correctly (if you entered them manually).

Keep in mind that every DNS change you make will affect the routing of email, so make sure you’re editing the correct domain. Always double-check your spelling.

Step 3: Add or Update MX Records

Now we’re ready to add or update the MX Records for your domain.

  1. Click “Edit DNS”
  2. Then scroll down to the “Manage DNS” records section

On this page, if there are old MX records listed, you’ll want to delete those first. Once you’ve done that, select MX from the Type drop-down, which will then change the other fields in the listing.

Here’s how you’ll fill out your information:

Once you’ve taken care of the above information, make sure to double-check it.

  1. Then click “Add Record”

Keep this in mind: if you set an incorrect “priority” for the MX record, you could cause problems. For example, if you’re adding a primary mail server and you set the priority to 10, that primary mail server won’t be checked first, so email might not get through. Again, if this is the primary server, set the priority to 0.

If your provider gave you multiple MX records, repeat this process for each one, entering its specific priority. After adding the MX record, it will appear in the DNS listings below.

If you find older MX records listed (or you’ve made a mistake with the one you just entered), you can either click the trash can icon to delete it or click the pencil icon to edit it.

Step 4: Add Recommended Email DNS Records

MX records alone will get your email routing correctly, but most providers also recommend SPF, DKIM, and DMARC records to keep it from landing in spam. These come from your email provider, not Hostinger.

Note: Your website host only provides a place to paste the values (DNS Records); your email provider is the one who tells you whether you need them and what they are. Check your provider’s admin console or support documentation to confirm.

Here’s where to look for each provider, since the location isn’t obvious or consistent:

SPF Record

The Sender Policy Framework (SPF) record is a DNS TXT record that lists all of the servers authorized to send emails from your domain.

SPF records were created because Simple Mail Transfer Protocol (SMTP) does not inherently authenticate the “From” address in an email, which could make it possible for someone to impersonate your domain and email address.

You don’t want that.

The best way to think of SPF records is like a bouncer at an important party with a guest list. Only those servers on the list are allowed in to mingle and send mail.

It’s important to note, however, that the SPF records no longer have a DNS record type. Instead, only TXT records are to be used. If your mail provider does require SPF records, you would add them as type TXT.

DKIM Record

DKIM (DomainKeys Identified Mail) is another layer of authentication that helps prevent spammers and other parties with malicious intent from impersonating a legitimate domain.

Adding a DKIM record is different than adding other records. Instead of doing this within DNS, you go to the Emails section.

In Hostinger, go to Emails and click “Custom DKIM.”

On the resulting page, click “Generate DKIM” record.

You can only have one DKIM record at a time, and it takes up to eight hours before it is active.

DMARC Record

DMARC (Domain-based Message Authentication and Conformance) gives you control over how unauthorized use of your domain gets handled, to prevent it.

Adding a DMARC record is a two-step process. First, you have to use a DMARC record generator, like the one offered by MX Toolbox. To do that, you enter your domain name in the field and click Check DMARC Record.

The results will be a window that includes all of the information necessary to add the DMARC record.

Then return to your DNS manager (where you added the MX record), add a new TXT record, and paste in that information.

Once you’ve done this, make sure to save the DNS updates and wait for them to take effect. That waiting period is called DNS propagation.

Step 5: Wait for DNS Propagation

Now that you’ve made all of the changes to your DNS records, it’s important to understand that it can take from a few hours (if you’re lucky) to 24 hours, and in some cases 48 hours, for DNS propagation to complete. Servers around the globe have to sync the data, so they can be routed to the proper location. That takes time.

Until that propagation completes, email delivery may be inconsistent or not happen at all. It would behoove you to use a temporary email address (such as a Gmail address) until propagation is complete.

If you want to keep tabs on the status of your DNS propagation, you can use a free tool like the DNS Checker, which will show you how far the propagation has reached at any given time. All you have to do is type your domain, select the type of record (such as MX), and click Search.

Once the DNS checker shows your domain has been propagated globally, you’re good to go.

Step 6: Verify MX Records

After propagation is complete, I would suggest you head back to the Hostinger hPanel and verify the DNS records to make sure they are all present and correct. Also, you can further verify the MX records for free by using the MXToolbox, DNSChecker, or the Google Admin Toolbox Dig that we’ve covered in this article.

After confirming with those tools, it’s time to do a real-world test by sending an email. To successfully run this test, send an email outside of your domain (such as to a Gmail address). If you receive the email, reply to it and make sure the reply arrives at the email associated with the domain for which you just added MX records.

But don’t settle for a single test.

Send a test email to a friend or colleague in a different organization and have them reply. If all of those emails are successful, you’re done. If any email you send goes to a spam or junk filter, then you’re going to have to double-check your DKIM and DMARC records, either of which can cause such issues.

Troubleshoot MX Record Issues

You might run into some issues when setting up these records. Here are some common issues and how to troubleshoot them.

Email not received

If the emails you send are not being received, make sure to verify that the MX record configuration is correct; that you’ve used the correct domain, the correct mail server, set the proper priority, and have waited for propagation to complete.

Incorrect priority values

Make sure you’ve set the correct priority value for your MX record. If you’re unsure of this, you’ll want to reach out to your email provider to find this value.

Old MX records still present

If there are old MX records still listed, you must delete them (and wait for propagation to complete after you’ve made the change). They don’t automatically go away.

DNS propagation delays

Common causes of DNS propagation delays include an incorrect TTL setting, ISPs and intermediate DNS server caching, registrar or hosting provider delays, and/or improper DNS configurations.

Authentication records missing

To troubleshoot missing authentication records, you’ll need to use DNS lookup tools (such as nslookup) to make sure the SPF, DKIM, and DMARC data are set and correct.

Registrar not pointing to Hostinger

Domain registrar nameservers will not point to Hostinger if you purchased your domain from someone other than Hostinger. Your domain name, website host, and email host can all be from separate providers, and you must connect them. You need to make sure that the domain nameservers are configured to properly point to the Hostinger DNS servers; otherwise, your site cannot be located.

Domain cannot be reached

DNS edits must be made wherever authoritative DNS is hosted. If you make changes to DNS records on a service outside of Hostinger, you’ll find that the domain cannot be reached. You must make sure to edit your DNS servers within the service that holds the official DNS records of your domain, and everything matches.

Your Email Routing Is Now Configured

Congratulations, you’ve successfully configured your MX records on Hostinger, so you should now be able to reliably send and receive emails from and to your domain.

One thing to keep in mind is that you should regularly review the DNS records anytime you change email providers. It’s also wise to regularly test emails to ensure they aren’t winding up in people’s spam filters.

Thank you so much for taking the time to read through this document on MX records. Remember, there are a lot of moving parts to email, and if one of those parts should fail to function properly, email will fail to send and/or receive, so make sure to give this the proper attention it deserves.

Be sure to give us a follow on social media! You can also use our HostHelper™ smart tool to answer all your website hosting questions.

About the Author

Jack Wallen
Contributing Expert

Jack Wallen is a veteran technology journalist and prolific author whose career spans more than two decades. Since the late 1990s, he has covered Linux, open-source software, cybersecurity, and web hosting infrastructure for major publications including ZDNET, CNET, TechRepublic, Linux.com, The New Stack, Linode, TechTarget, and Linux New Media. Jack has tested and reviewed countless hosting platforms, control panels, and server-side tools, earning a reputation for clear, practical guidance and deep hands-on expertise. He’s also written more than 70 novels — one of which even revolves around the Linux operating system. For more on Jack’s work, visit jackwallen.com.

« BACK TO: HOW-TO

Meet the Experts

Our team of experts with a combined 50+ years of experience in web hosting serve insight and advice to more than 20 million users!

We Know Hosting

$

4

8

,

2

8

3

spent annually on web hosting!