Skip to main content
← Back to course

Custom Domains and HTTPS

A generated *.up.railway.app URL is fine for testing — a real product needs your own domain, and Railway makes attaching one straightforward.

Add a custom domain under a Service's Settings → Networking. Enter your domain (or subdomain), and Railway provides the DNS records you need to add at your domain registrar or DNS provider — typically a CNAME record pointing at Railway's infrastructure.

HTTPS/SSL certificates are provisioned automatically. Once your DNS record is correctly pointed at Railway, it automatically issues and renews a valid SSL certificate for your domain — no manual certificate management, no expiration to track yourself.

DNS propagation isn't instant. After adding your DNS record, it can take anywhere from minutes to (rarely) up to 48 hours to fully propagate — if your domain isn't resolving immediately, that's often just propagation delay, not necessarily a misconfiguration.

A domain can point at a specific Service in a specific Environment. Your production Environment gets your real domain (app.example.com); a staging Environment might use a separate subdomain (staging.example.com) or just its generated Railway URL — deliberate, not automatic.

Redirects and www/non-www handling are configurable, if your setup needs www.example.com to redirect to example.com (or vice versa) — a small detail, but one real users and SEO both notice.

Why this matters for you

Attaching your own domain is what actually makes a Railway-hosted service feel like a real product rather than a demo — and Railway's automatic HTTPS removes a genuine, historically painful piece of manual infrastructure work.

▶️ Before the next lesson

If you have a domain (or a free subdomain option from your registrar), start the process of adding it to your Railway service — DNS propagation can take a while, so starting early means it's likely ready by the time you need it later in this course.