Managed Databases, Domains and HTTPS

Run production PostgreSQL with backups and pooling, and put your app on a custom domain with HTTPS.

Intermediate · about 3 hours · difficulty 2/5

Learn first: Environments, Config and Secrets, How the Internet and the Web Work

A real launch needs a database you will not lose and a domain people can remember.

Managed PostgreSQL

Providers like Neon, Supabase, Render and the large clouds give you PostgreSQL with backups, monitoring and connection pooling.

  • Turn on automated backups and actually test a restore once.
  • Use the pooled connection string for app traffic and a direct one for migrations.
  • Pick a region near your app servers to cut latency.
  • Use branching or separate databases for preview environments, never production.

Domains and DNS

Buy a domain from a registrar, then point it at your host: an A or CNAME record for the root or a www subdomain, as your platform instructs. Changes can take time to propagate. Set up a redirect so only one canonical URL exists.

HTTPS

Platforms like Vercel and Render issue and renew TLS certificates automatically through Let's Encrypt. Enable HSTS once everything works on HTTPS.

Email deliverability

If your app sends emails (OTP, application updates), configure SPF, DKIM and DMARC records for your domain, or your emails will land in spam.

Pitfalls

  • No backups, or backups never tested.
  • Running migrations against production from your laptop.
  • Forgetting to renew the domain.

You are ready to move on when your project runs on your own domain over HTTPS, with daily database backups you have restored at least once.

Key concepts

  • Managed PostgreSQL providers
  • Backups and restore tests
  • Pooled vs direct connections
  • DNS records for custom domains
  • Automatic HTTPS and HSTS
  • SPF, DKIM and DMARC
  • Database branching

Mini project

Attach a custom domain to your deployed portal with HTTPS, configure email authentication records for transactional email, and perform and document a backup restore drill.

Check yourself

Why use a pooled connection string for app traffic but a direct connection for running migrations?

Free resources