Cloudflare DNS redirection loop

I’ve setup Cloudflare following your instructions here:

However when visiting my domain it appears to redirect to apex → www → apex until the browser halts the request.

Your DNS settings seem to be properly configured.

When you add a root domain as a custom domain, Render will automatically add the www → root redirect. Your application seems to be configured to issue a 301 from the root domain → www subdomain, creating a redirect loop.

To resolve this, you can either update your application to serve content from the root domain or you can remove the custom domain from your Render service and add the www custom domain, so Render automatically redirects the root domain to the www domain.

1 Like

Hey Jake,

You are correct. I added code to direct from apex to www when I was using Digital Ocean and I thought I removed it but I had not.

My issue is now resolved. Thank you.

1 Like