
Mini lesson · English
How to set up email on your own domain
Set up a domain mailbox through your provider and verify receiving, sending and replying with inboxes you control.
Who is this for?
People who want an address on their own domain. You will follow provider settings and test real messages; writing email-server code is not required.
Before you start
A domain you control, permission to change its mail settings, a mailbox-provider account and an outside test inbox. This route uses Google Workspace or an equivalent existing provider; plan or trial terms depend on your account. A send-only API is not a full mailbox. Worked answers are illustrative examples, not completed tests on your account. Replace their sample observations with your own results, or identify the step that is still blocked.
Estimated time: 22–40 min
Estimates for the supplied starter files with prerequisite accounts and tools ready. Setup, deployment queues and delivery/DNS waits take additional time. Account verification, DNS caching and delivery can add waiting. Provider availability and fees vary; no free mailbox entitlement is assumed.
What you will learn
- Choose and configure a real two-way mailbox.
- Preserve existing mail while applying provider-issued settings.
- Verify received messages, replies and authentication separately.
Step 1
Choose a real mailbox
Make sure the service supports the journey you want.
Choose the address and mailbox provider in your own account. Check that it offers an inbox and authenticated sending/replies, not just forwarding or a website-email API.
Confirm the subscription or trial terms before starting. Keep any existing domain users in view so a new setup does not interrupt their mail.
A concrete example
Two-way test: outside inbox → domain mailbox → reply back outside. Forwarding-only and send-only tools cover different parts of that journey; neither alone establishes a full mailbox.
Help set up a two-way mailbox on my owned domain with my chosen provider. Use the provider’s actual account instructions and preserve existing mailbox users. Prepare a redacted DNS plan before any change. Guide me through sending a distinctive message from my outside inbox, receiving it and finding the reply. Do not treat a send-only API result as a working mailbox.Google Workspace: current plans and trial
Files for this step
Open or download the files below. When saving a project, keep the folder paths shown in the filenames.
How it works (optional)
Create a mailbox on your own domain
A domain mailbox, a forwarding address and an email API solve different jobs.
A mailbox lets you receive and read messages and send replies. A forwarding address passes incoming messages to another inbox; it may not provide authenticated sending from that address. A transactional API sends application-generated messages and does not necessarily give you a normal inbox.
Our goal is a mailbox you can use for two-way conversation. Compare providers for domain support, receiving, sending, account access and cost. The example address hello@your-domain is a pattern; use a real domain you own, not that literal string.
Worked example
A contact form can send a notification through an API while hello@your-domain still has no inbox. A successful API send does not prove that people can email that address and receive your reply.
Google Workspace: current plans and trial
Extra implementation exercise
You can send a test email through an API. Does that prove that hello@your-domain is a working two-way mailbox?
Show a worked solution
No. Confirm that the provider supplies mailbox receiving and sending, then test both directions. Do not infer inbox availability from a successful API request.
- Distinguishes application sending from mailbox receiving.
- Requires an incoming test and a reply through the chosen mailbox.
Common mistake
Buying a domain and assuming a mailbox was created with it.
Step 2
Record the current domain mail settings
Plan the change before replacing any working service.
Save the current mail-related domain settings privately and use mail-plan.csv. Obtain the new provider’s account-specific instructions. Ask the assistant to explain whether the change replaces existing mail routing.
Do not combine unrelated providers’ routing records just to experiment. Understand which existing users and addresses a replacement would affect.
A concrete example
Before replacing incoming routing, ask: “Who currently receives mail on this domain, and where?” A new mailbox for you should not silently remove another user’s working route.
Google Workspace: activate Gmail · Google Workspace: add an account
Try it yourself
Which current service must keep working, and what exact provider change have you planned?
Discuss your answer with the lesson tutor
Show a worked solution
Example change record: The domain already receives mail for one user through its current provider. I saved those settings and will confirm how that user is preserved or migrated before replacing incoming routing. I will not mix the old and new providers’ MX rows as an experiment.
- Identifies any existing mail route/users affected by the proposed change.
- Uses the new provider’s actual instructions while retaining a record of previous settings.
Files for this step
Open or download the files below. When saving a project, keep the folder paths shown in the filenames.
How it works (optional)
Create the mailbox and record its DNS requirements
The provider supplies exact records for your domain. Keep the website’s existing records intact.
Worked route: sign in to the Google Workspace Admin console for your own organization and follow its domain-verification setup. Add the verification record it supplies. In Directory → Users, create the intended user/mailbox for that domain. Follow the Gmail activation setup and copy its requested MX entries, including priority, into mail-plan.csv before editing DNS.
MX records control incoming mail routing. Their priority values order destinations; lower numbers have higher priority. Changing MX records for the domain can affect existing mailboxes, so do not append an unrelated provider’s example to a working setup.
Before editing mail records, save the complete current DNS zone, including website A/AAAA/CNAME and existing MX/TXT entries. Add a row for each planned change in mail-plan.csv and mark unchanged website records 'preserve'. This is a mail setup, not a reason to replace the whole zone.
This is a worked Google Workspace route, not a requirement to buy a new account. If you already have a domain mailbox provider, use its supported receiving/sending setup and exact records. Do not assume another provider’s free plan includes custom domains or the same capabilities.
Worked example
After saving the provider-supplied MX records at your DNS provider, return to the Admin console and complete Activate Gmail. If you are migrating a domain already used for email, first identify the current users and routing. For an existing busy domain, plan the migration with its owner. A new test subdomain can avoid disrupting an established mailbox system.
Google Workspace: activate Gmail · Google Workspace: add an account
Extra implementation exercise
Your domain already has working mailboxes. Should you simply add a second provider’s MX records alongside them to test a new mailbox?
Show a worked solution
No. Mixed provider records can route messages unpredictably or fail over somewhere unintended. Follow a deliberate provider migration plan or use an isolated test domain/subdomain supported by the provider.
- Recognizes that MX changes affect domain mail routing.
- Plans with the existing mail owner or uses an isolated supported test setup.
Common mistake
Deleting website records while performing an email-only setup.
Step 3
Complete the provider’s setup
Copy the settings supplied by your account and verify them there.
Create the mailbox user and apply only the provider-issued domain records, reviewing the plan with the assistant before saving. Incoming routing sends mail toward the inbox. Outgoing authentication helps other services check mail sent by your domain; follow the provider setup for both.
Record incoming activation and outgoing authentication separately. If an existing policy conflicts, have the assistant reconcile the legitimate senders rather than duplicating or weakening settings just to hide an error.
A concrete example
Incoming routing tells mail where to arrive. Sender authentication helps a receiving service check mail sent by your domain. For example, incoming activation can pass while outgoing authentication is still pending; record both instead of calling the whole setup complete.
Google Workspace: email authentication overview · SPF specification: DNS lookup limits · dmarcian: SPF Survey tool
Try it yourself
What does your provider confirm, and which setup item remains pending?
Discuss your answer with the lesson tutor
Show a worked solution
Example setup record: The provider confirms incoming-mail activation. Outgoing signing is still pending, so setup is not fully checked. I will review the provider-issued authentication instructions with the assistant while preserving the legitimate existing senders.
- Reports incoming activation and outgoing authentication as distinct checks.
- Identifies the actual pending setup item without weakening or duplicating policies to hide it.
Files for this step
Open or download the files below. When saving a project, keep the folder paths shown in the filenames.
How it works (optional)
Configure authenticated sending
Receiving mail and proving that a sender may use your domain are separate configurations.
Use your provider’s current SPF and DKIM instructions. SPF publishes which senders are authorized for the domain; DKIM lets receiving systems verify a cryptographic signature. The provider supplies the actual names, values and selectors.
Do not create two separate SPF policy records at the same name. If several services send for your domain, their authorization must be combined into a valid policy with the provider’s guidance. SPF also limits DNS lookups during evaluation; ask the provider’s validator to check the complete policy rather than adding include mechanisms blindly. DMARC adds alignment policy and reporting; understand legitimate senders before enforcing a policy that could reject their mail.
SPF limits lookup-causing mechanisms/modifiers to ten during evaluation, including nested include/redirect processing. Counting the TXT lines from one dig command is not a complete lookup-budget check. Use your provider’s full-policy validator; do not blindly add more includes or weaken authentication policy.
For a concrete lookup check, use your provider’s complete SPF validation tool or the optional SPF Survey linked below: enter only the public domain name, inspect its evaluated lookup count/errors and compare the legitimate sending services with your plan. Do not paste passwords or API keys. A current DNS survey is an observation, not a guarantee of future delivery; tools may have account/usage limits.
Worked example
A website notification service and a human mailbox may be different senders. Getting one sender verified does not automatically authenticate the other. Preserve a record of which service each DNS entry belongs to.
Google Workspace: email authentication overview · SPF specification: DNS lookup limits · dmarcian: SPF Survey tool
Extra implementation exercise
You find one existing SPF policy, and a new service asks you to add another. What should you investigate before saving?
Show a worked solution
Determine how the provider expects its authorization to be merged with the existing policy. Use its validation guidance, and keep a single valid SPF policy at that name.
- Checks all legitimate sending services and the existing policy.
- Avoids duplicate SPF policies at one DNS name.
Common mistake
Copying sample SPF or DKIM values that belong to a different service or domain.
Step 4
Test outside the provider dashboard
Use a distinctive message so the two ends can be matched.
From your outside inbox, send a short synthetic test to the domain mailbox. Find the received copy, reply to it and look for that exact reply in the outside inbox. Use mail-test.txt for the record.
Check the sender and reply address and inspect spam/delivery information if a message is missing. A dashboard saying the user exists is not delivery evidence.
A concrete example
“M1 arrived in the new inbox; its reply is missing outside” is a useful diagnosis. “The mailbox exists in the dashboard” does not test either delivery leg.
Try it yourself
Where did your test message and reply actually arrive? What is still missing?
Discuss your answer with the lesson tutor
Show a worked solution
Example delivery record: I sent “Mailbox test M1 — blue notebook” from my outside inbox. That exact message arrived in the domain mailbox. Its reply has not appeared outside, including spam, so receiving passed but reply delivery remains unresolved. I will inspect the reply address and outgoing delivery status.
- Matches a distinctive outside message to the received copy and the reply.
- Identifies a missing leg and a relevant next delivery/address check.
Files for this step
Open or download the files below. When saving a project, keep the folder paths shown in the filenames.
How it works (optional)
Test receiving, sending and replying
Use a second inbox you control outside the domain to verify a real conversation.
Send a distinctive message from the outside inbox to your new address. Find it in the intended domain mailbox. Reply from that mailbox and verify that the outside inbox receives the reply with the expected sender address.
Send a new outgoing message too. Inspect the received message’s authentication results and the provider’s verification status. A message in Sent only proves that the client attempted to send it; an actual received copy provides delivery evidence. Check spam folders and allow for DNS changes to settle.
Worked example
Record “incoming received”, “outgoing received” and “reply address correct” separately in mail-test.txt. If incoming works but outgoing fails, investigate sending setup before changing unrelated website DNS.
Extra implementation exercise
Your mailbox receives messages, but replies land in spam and authentication fails. Which part is verified, and what remains unresolved?
Show a worked solution
Incoming routing is working. Outgoing authentication and placement still need investigation. Inspect the actual SPF/DKIM/DMARC results rather than declaring the entire mailbox complete.
- Keeps receiving success separate from authenticated sending.
- Checks the failing authentication result and provider’s sender setup.
Common mistake
Using a provider dashboard badge as the only proof of two-way delivery.
Step 5
Finish a two-way delivery record
Keep an honest handoff you can retest later.
Repeat the receive-and-reply journey after any repair. Save a redacted record of the provider configuration and the exact checks that passed. Keep credentials and private message content out of shared notes.
If DNS or account activation is still pending, identify the last completed step and next check. Do not substitute imagined delivery for an unavailable live test.
A concrete example
Use three short result rows: incoming message, outgoing message and reply. Keep provider authentication results alongside them; one successful arrival does not explain every part of the setup.
Try it yourself
Start with these materials
The starter files and test content are supplied. A live verification still requires your own permitted provider account, inbox or domain as listed under prerequisites. Local inspection is possible without them; record the live step as not tested until you actually perform it.
Provide the observed receiving, sending and reply results for your domain mailbox.
What to produce A redacted mail-setting plan and an observed receiving/sending/reply record.
Discuss your answer with the lesson tutor
Show a worked solution
Example handoff: M2 arrived from my outside inbox, a new message sent from the domain mailbox arrived outside, and my reply to M2 returned to the expected address. The received-message checks show the intended sender/authentication results. This is a two-way mailbox, not just forwarding; the shared record omits credentials and private message contents.
- Includes observed incoming, outgoing and reply results using controlled inboxes.
- States the final service type and unresolved delivery/authentication limits without secrets.
Files for this step
Open or download the files below. When saving a project, keep the folder paths shown in the filenames.
How it works (optional)
Your assignment: complete a two-way mail test
Document the domain address, its service requirements and evidence of both directions.
Complete the provider’s setup using your own account. Perform the outside-inbox tests and keep a redacted record. Do not place passwords, recovery codes or private message content in the submission.
If your account or DNS is still pending, mark the exact stage and the next check. You can complete the planning exercise without falsely claiming a delivered message.
Worked example
The result should let someone distinguish a real mailbox from a forwarding-only route or a send-only API. Your website’s contact route can then use this address.
The complete reference walkthrough is available in reference/assignment-walkthrough.txt. Compare its steps with your own result; fill the test record from observations in your own project.
Extra implementation exercise
Set up a domain mailbox and provide evidence of receiving, sending and replying.
Show a worked solution
First choose a provider that supports a real inbox and authenticated replies. For the Google Workspace route, use an existing subscription or eligible trial and check its terms before starting. Save the current DNS zone and identify whether existing mail users would be affected.
Create the intended user in the provider, record its own MX requirements with priorities and complete its domain/Gmail activation steps. Record SPF and DKIM requirements from that same account. Keep one valid SPF policy at a name and validate all legitimate sending services together; do not weaken DMARC blindly to hide a failure.
Send a distinctive message from your own outside inbox to the new mailbox. Find the actual received copy, reply to it and find the actual reply outside. Inspect sender/reply address and authentication results. 'Incoming received; reply missing' is a partial result: check outgoing delivery/authentication and spam before calling it complete.
- Chosen service actually supports the intended mailbox behavior.
- Tests show both directions and authentication status, or precisely document a pending failure.
Common mistake
Sharing mailbox passwords when a test record and redacted headers are sufficient.
Was this lesson useful?
Leave a like, or share it with someone who could use it.
Continue learning
- How to build your first personal website
- How to publish your website from GitHub
- How to connect a custom domain to your website
- How to make your website usable on phones
- How to make website images load faster
- How to get website feedback in your inbox
- How to add email subscriptions to your website
- How to send automated emails from your website
- How to save form submissions in a database
- How to let people sign in to your website
- How to keep a page private
- How to let users edit their profile information
- How to let users upload images
- How to keep API keys out of your frontend
- How to show data from an external API on your website
- How to add an AI chatbot to your website
- How to make a chatbot answer from your own content
- How to add a blog to your website
- How to add search to your website
- How to add another language to your website
- How to help Google find your website
- How to fix your website preview when sharing a link
- How to measure visits and useful actions on your website
- How to let visitors book an appointment
- How to accept a payment on your website
- How to preview website changes before publishing
- How to undo a broken website deployment
- How to back up and restore your website data
- How to find and fix errors on your live website