> For the complete documentation index, see [llms.txt](https://docs.mailtrap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mailtrap.io/email-live-sending/troubleshooting/sending-from-domain-not-allowed.md).

# Domain not allowed

How to fix "Sending from domain is not allowed" (550 5.7.1) error in Mailtrap Email Live Sending.

### Error message

```
Error: Mail command failed: 550 5.7.1 Sending from domain yourdomain.com is not allowed
```

This error occurs when you try to send an email using SMTP with a domain that doesn't match your verified domain in Mailtrap.

### Common causes

**1. Domain mismatch**

You're sending an email with `FROM: {anything}@mydomain.com`, but in Mailtrap, you've verified `anotherdomain.com`.

**The verified domain and FROM domain in your emails must match.**

{% hint style="warning" %}
If you verified `example.com` in Mailtrap, you can only send emails from `*@example.com` addresses.
{% endhint %}

**2. Domain not verified or Compliance Check failed**

Your domain might not be fully verified, or you haven't passed the Compliance Check.

### How to fix

{% stepper %}
{% step %}
**Check your verified domains**

Go to [Sending Domains](https://mailtrap.io/domains) in your Mailtrap account.
{% endstep %}

{% step %}
**Verify domain status**

Look for the **Verified** badge next to your domain. If you don't see it:

1. Click on the domain
2. Check if all DNS records are found by Mailtrap (all should be green)
3. If any records are missing or incorrect, update them with your DNS provider
   {% endstep %}

{% step %}
**Check compliance status**

Scroll down to see the **Compliance Check** status.

If the compliance check hasn't passed:

* Review any additional steps required
* Complete any pending actions
* Wait for the check to complete
  {% endstep %}

{% step %}
**Update your FROM address**

Ensure your application sends emails from an address that matches your verified domain:

* **Correct:** `noreply@yourdomain.com` (if `yourdomain.com` is verified)
* **Incorrect:** `noreply@otherdomain.com` (if `otherdomain.com` is not verified)
  {% endstep %}
  {% endstepper %}

### Related articles

* [Sending Domain Setup](https://docs.mailtrap.io/general/sending-domain.md)
* [SMTP Integration](https://docs.mailtrap.io/email-live-sending/setup/smtp-integration.md)
* [Unauthorized Error (401 Code)](https://docs.mailtrap.io/email-live-sending/troubleshooting/unauthorized-401-error.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mailtrap.io/email-live-sending/troubleshooting/sending-from-domain-not-allowed.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
