# Mail Niaga SMTP: add & verify a domain

> Add a sending domain in your Mail Niaga SMTP account, copy the DNS records, and click VERIFY NOW to verify the domain.
>
> Source: https://docs.mailniaga.com/smtp/

This article is for customers of **Mail Niaga SMTP**, an SMTP account that is separate from the Mail Niaga console. Before you send email through Mail Niaga SMTP, add your sending domain and verify it with DNS records.

If you send campaigns in the Mail Niaga console, use **Sending** → **Sending domains** in that console.

## Add a domain

Do these steps in your Mail Niaga SMTP account:

1. Log in to your Mail Niaga SMTP account with the access that you got.
2. In the top menu, click **Domain**.
3. Click **Add Domain**.
4. Type your domain name, for example `example.my`, then click **Save**.
5. In the list of domains, click the name of the domain to see its DNS records.

## Add the DNS records

Copy each DNS record to the DNS settings of your domain, for example in Cloudflare or in your hosting panel. Each DNS panel can use slightly different column names.

A domain can have only one SPF record. If your domain already uses Google Workspace or Office 365 for email, put all the includes in one record:

| Email on your domain | SPF record |
|---|---|
| No other email | `v=spf1 a mx include:<include Mail Niaga SMTP> ~all` |
| Google Workspace | `v=spf1 mx include:<include Mail Niaga SMTP> include:_spf.google.com ~all` |
| Office 365 | `v=spf1 mx include:<include Mail Niaga SMTP> include:spf.protection.outlook.com ~all` |

Replace `<include Mail Niaga SMTP>` with the include value in the list of DNS records of your account.

## Verify the domain

After you add all the DNS records, do these steps:

1. Open the domain again in your Mail Niaga SMTP account.
2. Click **VERIFY NOW**.
3. Read the message in the popup, then click **OK**.

When all the records are correct, the status of the domain changes to **verified**.

## Tips

This advice helps you keep your SPF record valid:

- **Check your SPF record with an SPF lookup tool.** Make sure that the record is valid, with no more than 10 DNS lookups.
- **Remove the includes that you do not use now.** Each include adds one lookup. If there are more than 10 lookups, SPF will fail.

## Common issues

### How do I write my SPF record if I use Google Workspace?

A domain can have only one SPF record. Put the include from Mail Niaga SMTP and include:_spf.google.com together in the same record.

### Why is my domain not verified yet after I clicked VERIFY NOW?

It is possible that the DNS records did not propagate yet. Wait some hours, then click VERIFY NOW again. Also make sure that you copied each record exactly, with no extra spaces.
