What Happens When You Type a URL and Press Enter
DNS lookups, TCP and TLS handshakes, HTTP requests, servers, and the browser's rendering pipeline. The whole journey of a web page, explained so it finally clicks.
Read →Password resets and receipts that end up in spam are a broken product. How transactional email works, SPF, DKIM and DMARC in plain English, and the habits that keep your emails in the inbox.
Your app sends emails that really matter: verification links, password resets, receipts, invitations. If they land in spam, or never arrive at all, users can't sign in, can't pay and assume your product is broken. Email deliverability is one of those unglamorous topics that has a direct effect on revenue.
Keep them separate, ideally on different sending subdomains or streams. If a marketing campaign gets spam complaints, you don't want that to hurt your password reset emails.
You can run a mail server, but deliverability depends heavily on the reputation of the sending IP address, and a fresh VPS IP has none (or a bad one inherited from a previous user). Use a transactional email service. Most have free or low-cost tiers for small volumes, simple APIs and the reputation management you'd otherwise have to build.
These three DNS records prove that emails claiming to come from your domain are legitimate. Major mailbox providers increasingly require them, especially for anyone sending at volume.
SPF (Sender Policy Framework) is a TXT record listing which servers may send email for your domain:
v=spf1 include:_spf.youremailprovider.com ~all
You can only have one SPF record per domain. Combine all your senders in it.
DKIM (DomainKeys Identified Mail) adds a cryptographic signature to each email. Your provider gives you a public key to publish as a DNS record, and receivers use it to check that the message wasn't forged or altered.
DMARC ties them together and tells receivers what to do when checks fail:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com
Start with p=none to collect reports without affecting delivery. Once you're confident all your legitimate email passes, move to p=quarantine, then p=reject. (DNS records explained.)
Acme <hello@mail.acme.com>. A noreply@ address is fine for system emails, but a monitored reply address builds trust.Don't make users wait while your app talks to an email API. Enqueue the email and send it from a background job, with retries if the provider is temporarily unavailable. (Background jobs.)
Never send real emails from development or test environments by accident. Use a local mail catcher like Mailpit, which accepts emails over SMTP and shows them in a web interface, or your provider's sandbox mode. (More free tools.)
Common causes are missing SPF, DKIM or DMARC records, sending from a server with poor IP reputation, spam-like content, mismatched link domains and high bounce or complaint rates.
Yes. Major mailbox providers increasingly require them, and they significantly improve deliverability while protecting your domain from spoofing.
Technically yes, but new server IPs usually have poor reputation, so emails often land in spam. A transactional email service is far more reliable for most apps.
DNS lookups, TCP and TLS handshakes, HTTP requests, servers, and the browser's rendering pipeline. The whole journey of a web page, explained so it finally clicks.
Read →There are dozens of HTTP status codes, but about fifteen cover nearly everything. What each one means, when to return it, and the mix-ups (401 vs 403, 301 vs 302) that confuse everyone.
Read →A, AAAA, CNAME, MX, TXT and NS records in plain English, why DNS changes seem slow, and the troubleshooting commands that tell you what is really going on.
Read →