Render

Redirect Your Apex Domain to Render

Render works best on www.yourdomain.com via a CNAME. The apex needs either ALIAS/ANAME support at your DNS provider, or a redirect. ApexToWWW gives you the redirect — free, with stable IPs, IPv6, and HTTP/3, no matter which DNS provider you use.

Jump to Setup
TL;DR

Render's custom domains work through a CNAME, which apex domains can't use per RFC 1034. Render's own apex workaround requires your DNS provider to support ALIAS, ANAME, or CNAME flattening — not all do. Point www to Render via CNAME, then redirect apex to www using ApexToWWW. Free, works with any DNS provider, automatic SSL.

Render's Official Approach

When you add a custom domain to a Render service (web service, static site, or Docker deployment), the Render Dashboard walks you through Settings → Custom Domains → Add Custom Domain. For a subdomain like www.yourdomain.com, Render shows you a CNAME target immediately — you add that CNAME at your DNS provider and you're done.

For the apex domain, Render's docs point you toward whatever apex workaround your DNS provider supports: an ALIAS or ANAME record (offered by providers like DNSimple and AWS Route 53), or CNAME flattening (Cloudflare's approach). If your provider supports one of these, Render will show you the value to enter and it behaves like a CNAME at the apex, working around the RFC 1034 restriction.

The catch: not every DNS provider supports ALIAS, ANAME, or CNAME flattening. Many popular registrars — GoDaddy, Namecheap, Google Domains successors, and others — simply don't offer a CNAME-like record type at the apex. If yours doesn't, Render's native apex setup isn't available to you at all, and you need a different approach.

The ApexToWWW Approach — Step by Step

This setup keeps your Render service on www.yourdomain.com using Render's standard CNAME path, and uses ApexToWWW to handle the apex 301 redirect. It works regardless of what your DNS provider supports. Total time: about 5 minutes plus DNS propagation.

  1. Step 1. In the Render Dashboard, open your service, go to Settings → Custom Domains, and click Add Custom Domain. Enter www.yourdomain.com.
  2. Step 2. Render displays a CNAME target for the www subdomain. Copy this value.
  3. Step 3. In your DNS provider, add a CNAME record: host www, value the target Render provided.
  4. Step 4. Add an A record: host @, value 65.21.184.101.
  5. Step 5. Add an AAAA record: host @, value 2a01:4f9:c012:a304::1.
  6. Step 6. Wait for Render to verify www and provision its Let's Encrypt certificate (usually a few minutes).
  7. Step 7. Test: curl -I https://yourdomain.com → you should see HTTP/2 301 with a Location header pointing at https://www.yourdomain.com/.

DNS Records Summary

Type Name Value
A @ 65.21.184.101
AAAA @ 2a01:4f9:c012:a304::1
CNAME www (Render target)

Comparison: Render's Native Apex vs ApexToWWW

Approach Works on any DNS IPv6 HTTP/3 Apex SSL
Render ALIAS/ANAME apex Requires support Depends Yes Yes
ApexToWWW redirect Yes Yes Yes Yes

When to Use Render's Native Apex Setup Instead

The ApexToWWW redirect pattern is not always the right choice. Use Render's native ALIAS/ANAME/CNAME-flattening setup if:

  • Your DNS provider already supports it. If you're on Cloudflare, Route 53, or DNSimple, the native path is one less external dependency and serves your Render app directly on the apex — no redirect hop at all.
  • You want the apex as your canonical URL. Some teams prefer example.com with no www. In that case you want Render serving content on the apex directly, not redirecting away from it.
  • You're comfortable managing DNS with your provider's proprietary record type. ALIAS/ANAME records behave slightly differently across providers, and moving DNS providers later can mean reconfiguring this record.

Otherwise — especially if your registrar doesn't support ALIAS/ANAME at all — the redirect pattern is the only option that works everywhere, and it adds IPv6 and HTTP/3 on top.

Other Hosting Platforms

The same pattern works for any platform that prefers a CNAME on www:

Frequently Asked Questions

Does this work with both Render web services and static sites?

Yes. Render's custom domain flow is identical for web services, static sites, and Docker-based services: add the domain in Settings → Custom Domains, get a CNAME target, and point www at it. ApexToWWW handles the apex redirect regardless of which Render product type is behind www.

Do I still need my DNS provider to support ALIAS or ANAME records?

No, that's the point. Render's native apex setup requires ALIAS, ANAME, or CNAME flattening at your DNS provider — DNSimple, Route 53, and Cloudflare support these, but many registrars don't. ApexToWWW uses plain A and AAAA records instead, which every DNS provider supports, so you don't need any special record type.

Does this affect Render's automatic SSL?

No. Render provisions and renews its own Let's Encrypt certificate for www.yourdomain.com as soon as the CNAME verifies. ApexToWWW separately provisions a Let's Encrypt certificate for the apex. Both renew automatically and independently — there's nothing to monitor manually.

What about Render preview environments and PR previews?

Unaffected. Render's preview environments use auto-generated onrender.com subdomains that are completely separate from your custom domain. The apex redirect only applies to yourdomain.com and has no interaction with preview URLs.

Ready to Set Up Your Render Apex Redirect?

Add two DNS records and your naked domain redirects to your Render service over HTTPS. Free, no signup, works with any DNS provider.

Get Started Now

Questions? Email hi@apextowww.com