Domain to netlify and subdomain to personal server

hi!
I have domain configured on Cloudflare with a buch of subdomain pointing to my personal server where I host instences of directus.

I would like to keep the subdomain pointing to my server, but I want the domain to point to an app hosted on netlify.

Is that possible? I tried seting up a redirect rule in Cloudflare, but I can’t get it to work.

What would be the easiest way to do this?
I suppose I could configure mydomain in netlify, but because I have many subdomains, that would imply quite a lot of work.

Any idea about the best way to do this?

Thanks!

Yes, that’s possible at the DNS level: no need for any redirect rule.

Just as with subdomains, you have two options:

  1. DNS A Record: Point your apex domain to Netlify’s load balancer IP address
  2. DNS CNAME ANAME Record: Point your apex domain to Netlify’s load balancer host address

Please see the specific instructions and the load balancer addresses here:

1 Like

thanks for taking the time to help me!
Could you give me more info about how to do that? I’m still unfamiliar with all this…

Please follow the step-by-step official Netlify guide I’ve already provided above.

If any of the steps are not clear to you, then ask a more specific question about that specific step.

Standing by.

1 Like

sorry, I didn’t realize there was a step by step guide.

so do I have this roght?

I assign my domain to my app in netlify
then,
I create a CNAME record in Cloudflare and set apex-loadbalancer.netlify.com as the target

That’s it?
I will still be able to manage my subdomains in Cloudflare?

1 Like

What some providers refer to as an ANAME is known as CNAME Flattening at Cloudflare.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.