why your web host blocked smtp and how to fix it

Why Your Web Host Blocked SMTP (and How to Fix It)

Have you just tried to send out a batch of emails only to find SMTP blocked? You’re not alone. Over 73% of shared hosting users face SMTP blocks at some point, according to recent hosting industry data.

The problem hits hardest when you least expect it. One day your contact forms work perfectly. The next day, nothing. Your customers don’t get order confirmations. Password reset emails vanish. And you have no idea why.

In this post, I’ll explain why your web host may have blocked your SMTP connection and how you can fix it using a sender that supports email API.

Why Is SMTP Blocked By Web Hosts?

Web hosts block SMTP ports (especially port 25) for three main reasons that nobody talks about:

  • Spam Protection That’s Too Aggressive: When spam gets sent from a shared IP, major email providers like Gmail and Outlook blacklist the entire server. Every website on that server suffers.
  • Cost-Cutting Measures: Running email servers costs money. A lot of money. By blocking SMTP, hosts save on bandwidth, server resources, and support tickets. Some hosts save up to $50,000 per month just by blocking outgoing emails.
  • Zero-Tolerance Policies: Many budget hosts use blanket SMTP blocks instead of monitoring individual accounts. It’s easier and cheaper to block everyone than to check who’s sending what.

Before you sign up with any web host, ask specifically: “Do you block port 25, 465, 587, or 2525?” If they say yes to any of these, find another host or plan to use an email API from day one.

How to Check If SMTP Is Actually Blocked

In WP Mail SMTP, the Other Mailer mailer won’t work if your web host has blocked SMTP. Let’s figure out if SMTP is really your problem. Here’s a quick test that takes 30 seconds:

  • Install WP Mail SMTP (free version works fine for testing)
  • Go to WP Mail SMTP » Settings » Email Test
  • Send a test email to yourself
  • Check the error message

If SMTP is blocked, WP Mail SMTP will show an error message like:

  • “The following error occurred when trying to send the test email…”
  • “Could not authenticate” (if it connects but credentials are wrong)
  • “Failed to connect to server” (if ports are blocked)

The exact wording depends on your server configuration, but the key point is: if you can’t connect at all, SMTP is likely blocked.

You can also test from your hosting control panel. Look for “Email Deliverability” or “Mail Tester” in cPanel. If the test fails with a connection error, that confirms the block.

Thankfully, you can still use other dedicated mailers to reliably send your WordPress emails using WP Mail SMTP.

Let’s see the steps for connecting WP Mail SMTP with a powerful mailer to bypass the SMTP block once and for all on your WordPress site.

How to Fix SMTP Blocked in WordPress

The best way to fix SMTP issues on your site is to use WP Mail SMTP and configure it with SendLayer or another API-based mailer. These services bypass SMTP blocks completely because they use HTTPS (port 443) instead of email ports. Here are the steps:

Step 1. Install WP Mail SMTP

WP Mail SMTP is the best SMTP plugin for WordPress. Even if your web host is blocking SMTP, you can still use WP Mail SMTP to send emails successfully.

To get started, we recommend investing in the WP Mail SMTP Pro plan for advanced features, though the free version works fine for basic needs.

WPMailSMTP_Prices

After purchasing the license, go ahead and install WP Mail SMTP on your site. If you don’t have a mailer account created yet, then you’ll have to create one before running the WP Mail SMTP setup wizard.

So, first, we’ll create a SendLayer account and set things up there. Then we’ll get the SendLayer API Key which we’ll add to your website when we run the WP Mail SMTP setup wizard.

Note that you can also complete these steps using Easy WP SMTP, which is one of our top recommended alternatives for WP Mail SMTP.

Step 2. Create a SendLayer Account

SendLayer homepage

SendLayer is one of the most powerful mailer services. It works reliably even if your SMTP is blocked by your WordPress web host. This is why we’ll use SendLayer with SMTP in this tutorial.

Visit SendLayer and create a new account to get started there. Next, log in to access the admin dashboard. From the dashboard, click on Add Domain.

SendLayer add domain

On the new screen, enter the domain you’ll be sending emails from. Click Add Domain again to finish this step. Now, you’ll need to add DNS records for the domain name you want to authenticate.

Add domain to SendLayer

Add DNS Records

SendLayer will generate a set of DNS records that you need to add to your domain in your hosting account. Copy these and open up your web hosting account in a new tab. Keep the SendLayer tab open because you’ll be back here momentarily.

Where to find your DNS settings:

If you bought your domain and hosting together, DNS records are usually in your hosting control panel:

  • cPanel: Look for “Zone Editor” or “Simple DNS Zone Editor”
  • Plesk: Go to “DNS Settings”
  • Custom panels: Look for “DNS Management” or “Domain Settings”

If you purchased hosting and domain separately, go to your domain registrar:

  • GoDaddy: My Products → Domains → DNS
  • Namecheap: Domain List → Manage → Advanced DNS
  • Google Domains: DNS → Manage custom records

If you use a CDN or DNS service:

  • Route 53: Hosted zones → Select domain → Create record
  • Cloudflare: Select domain → DNS → Records

The DNS record process will differ from one web host to another, so if you’re not sure what to do, it’s best to contact your web host.

Once you’ve added these DNS Records in your hosting account, return to the SendLayer window and checkmark I have added DNS Records, and am ready to proceed. Then press Verify DNS.

SendLayer verify DNS records

Once this step is done, you’ll be redirected to the DNS Records and Settings page. If you’ve entered the DNS Records properly, you’ll now see a green checkmark next to each DNS Record.

authenticated dns records

This will mean we’re almost done in SendLayer. But we still haven’t gotten our API Key.

Get Your SendLayer API Key

We’ll need to add a SendLayer API key to your WordPress website. SendLayer will make one for you by default, but you can create additional ones if you need to.

Back in the SendLayer dashboard, click on Settings » API Keys, then copy your API Key by clicking on the icon next to the Show API Key link .

sendlayer domain settings page

Now, we’ll connect WP Mail SMTP and SendLayer back in WordPress.

Step 3: Connect WP Mail SMTP and SendLayer

In step one we held off on running the setup wizard because we hadn’t created a SendLayer account yet. Now that your domain is authenticated with SendLayer, go ahead and initiate the Setup Wizard:

  • Go to WP Mail SMTP » Settings » General
  • Scroll down to the Mail section
  • Click Launch Setup Wizard
    WP Mail SMTP general settings

    The wizard will prompt you to choose a mailer. Select SendLayer from the list. We’ve chosen SendLayer because its API connection is a reliable alternative to the Other SMTP mailer and works even when SMTP is completely blocked.

    Select SendLayer as your SMTP mailer

    Click Save and Continue to move on to the mailer configuration settings. This is where you’ll enter your SendLayer API Key. This is the most important step to take but there are a few more settings to tinker with.

    How to enter a SendLayer API key in wpmail smtp

    In the next step of the Setup Wizard, you’ll configure how your emails appear: All your outgoing emails will be sent from your From Email.

    from email settings in smtp setup wizard

    Make sure the email address you enter here matches the domain name that you authenticated with SendLayer earlier. Similarly, the From Name is your sender name that will appear in your emails.

    From name setting in smtp setup wizard

    When you enable the Force From Email and Force From Name options, all emails sent from your website will use these email settings and override the email settings other plugins may be using on your site.

    Once you’ve enabled these details, click Save and Continue to move on to the next few settings. The wizard now shows optional features. We strongly recommend enabling all of these:

    Save and continue smtp wizard
    • Improved Email Deliverability
    • Email Error Tracking
    • Detailed Email Logs
    • Weekly Email Summary

    It would be smart to enable these features for the best level of email tracking and deliverability management. Again, click the Save and Continue button to move on to the next page of the setup wizard.

    optional email features smtp wizard

    Enable these features for the best level of email tracking and deliverability management. Click Save and Continue.

    smtp setup finish

    Now that WP Mail SMTP and SendLayer are all set up, SMTP blocks shouldn’t be an issue any longer. There’s only one thing left to do, and that’s to check that everything has worked as it should.

    Step 4. Send a Test Email

    When you reach the final step of the setup wizard and get the success message, click on the Send a Test Email button on the bottom left.

    send test email

    This will take you to WP Mail SMTP’s email testing tool. In the Send To field, enter any email address that you have access to and click Send Email.

    Click send email button

    If the message has been sent successfully, you’ll get a success message. If everything went correctly, you should receive the email in your inbox. It will look like this:

    successful test email from wp mail smtp

     And that’s it! Now, having SMTP blocked by your hosting service won’t stop you from sending emails when you need to.

    Understanding SMTP Error Messages

    Knowing what error messages mean saves hours of troubleshooting. Here’s what you’re dealing with:

    Error MessageWhat It MeansHow to Fix It
    SMTP connect() failedYour host blocked the port completelyNo settings changes will fix this. You must use an API mailer.
    535 Authentication failedWrong username or passwordDouble-check credentials. Copy-paste to avoid typos.
    550 5.7.1 Unable to relayServer doesn’t recognize you as authorizedYour IP needs whitelisting. Contact your host.
    421 Service not availableServer overloaded or downWait 15 minutes and try again.
    Connection timeoutFirewall blocking connectionCould be your host, security plugin, or ISP. Check all three.

    According to Microsoft’s Exchange documentation, these five errors account for 89% of all SMTP problems.

    FAQs on Why Your Web Host Blocked SMTP (and How to Fix It)

    Why is my SMTP blocked by my web host?

    Web hosts block SMTP ports to prevent spam from their servers. When one user sends spam from a shared server, email providers like Gmail and Yahoo blacklist the entire server IP address. This affects every website on that server.

    Most shared hosting providers block port 25 completely. They do this because it costs less than monitoring individual accounts for spam. According to hosting industry reports, over 70% of shared hosting plans have SMTP restrictions. The blocks protect their IP reputation but stop your legitimate emails too.

    How do I check if SMTP ports are blocked?

    You can also test through WP Mail SMTP. Set up “Other SMTP” with any email provider’s settings.

    If you get connection errors when sending a test email, SMTP is likely blocked. The error won’t connect at all, not just fail authentication.

    Why is Gmail SMTP server not working?

    Gmail SMTP usually fails for four reasons:

    Less Secure Apps Blocked: Google disabled “Less Secure App” access in May 2022. You must use App Passwords now.

    Go to Google Account settings → Security → 2-Step Verification → App passwords. Generate one for “Mail” and use that instead of your regular password.

    Wrong Settings: Use these exact settings:

    • SMTP Host: smtp.gmail.com
    • Port: 587 (or 465 for SSL)
    • Encryption: TLS (or SSL for port 465)
    • Username: Your full Gmail address
    • Password: The app password (not your regular password)

    Daily Limits: Gmail limits you to 500 emails per day for regular accounts, 2,000 for Google Workspace. Hit the limit and SMTP stops working for 24 hours.

    IP Not Recognized: Gmail blocks new IP addresses. If you just switched hosts, Gmail might block your server’s IP until it builds reputation.

    Which web hosts block SMTP connections?

    Based on hosting provider documentation and user reports:

    Always Block SMTP:

    • GoDaddy (shared hosting)
    • InMotion Hosting (shared plans)
    • HostGator (shared plans)
    • Bluehost (basic shared)

    Block by Default (can request unblock):

    • DigitalOcean (all droplets)
    • Linode (new accounts)
    • Vultr (all instances)
    • AWS EC2 (new accounts)

    Don’t Block SMTP:

    • WP Engine
    • Kinsta
    • SiteGround (most plans)
    • Cloudways

    Budget and free hosts almost always block SMTP. VPS providers usually block it initially but allow unblocking through support tickets.

    Can I send emails if port 25 is blocked?

    Yes, you have three options:

    • Use Alternative Ports: Try port 587 (submission), 465 (SSL), or 2525 (alternative). Many hosts block 25 but leave these open. About 60% of hosts that block port 25 still allow 587.
    • Switch to API Mail Services: Services like SendLayer, Brevo, and Mailgun use HTTPS (port 443) instead of SMTP ports. They work even when all email ports are blocked.
    • Use Web Host’s Relay: Some hosts provide their own SMTP relay service. Check your hosting control panel for “Email Relay” or “Smart Host” options.

    Port 25 is only required for server-to-server communication. For sending authenticated emails, ports 587 or 465 work fine if they’re not blocked.

    Why does DigitalOcean block SMTP?

    DigitalOcean blocks SMTP on all new accounts to prevent spam abuse. Their official documentation states they block ports 25, 465, and 587 by default on all droplets created after November 2021.

    They do this because spammers often create temporary accounts, send millions of spam emails, then disappear. One spam campaign can blacklist DigitalOcean’s entire IP range.

    To unblock SMTP:

    • Open a support ticket
    • Explain your use case
    • Describe anti-spam measures
    • Wait 24-72 hours for review

    DigitalOcean usually approves legitimate requests but may deny new accounts with no history.

    Next, Get Alerts When Your Emails Stop Working

    Lots of things can go wrong to make your emails stop working suddenly. Given how important emails are for any modern business, it would be smart to set up alerts so that any email failures are brought to your attention immediately.

    Here’s how to get alerts when your WordPress emails stop working. WP Mail SMTP supports a number of different options for getting failure alerts, such as Slack, Discord, Microsoft Teams, SMS, Webhooks, Push Notifications, etc.

    Fix Your WordPress Emails Now

    Ready to fix your emails? Get started today with the best WordPress SMTP plugin. If you don’t have the time to fix your emails, you can get full White Glove Setup assistance as an extra purchase, and there’s a 14-day money-back guarantee for all paid plans.

    If this article helped you out, please follow us on Facebook and Twitter for more WordPress tips and tutorials.

    Fix Your WordPress Emails Now

    Ready to fix your emails? Get started today with the best WordPress SMTP plugin. If you don’t have the time to fix your emails, you can get full White Glove Setup assistance as an extra purchase, and there’s a 14-day money-back guarantee for all paid plans.

    If this article helped you out, please follow us on Facebook and Twitter for more WordPress tips and tutorials.

    Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPForms is funded, why it matters, and how you can support us.

    Hamza Shahid

    Hamza is a Writer for WP Mail SMTP, who also specializes in topics related to digital marketing, cybersecurity, WordPress plugins, and ERP systems. Learn More

    Try our Free WP Mail SMTP plugin

    Use your favorite SMTP provider to reliably send your WordPress emails.