Cloudflare DNS configuration for Subdomains + Branch Domains

NETLIFY SITE NAME: https://krzysztofcieslikcom.netlify.app/
DNS CUSTOM DOMAIN: krzysztofcieslik.com + subdomains: pl. en. dev. www.

  1. I need to do netlify + next.js internationalization based on subdomains like this
    [image2]

  2. I also need dev.krzysztofcieslik.com for my dev branch (testing purposes)

What I already did in netlify
[image3]

IMAGE 2:

Image 3:

@chriz-space Welcome to the Netlify community.

What are you trying to accomplish by using Cloudflare for DNS instead of Netlify?

Hey Guys - I know that you have SSL and DNS settings in place but key reasons are:

  1. I have a lot of different domains pointing to different places and I would like to manage them from one place - cloudflare seems to be right one
  2. I need to point the same domain eg. krzysztofcieslik.com for an email purpose and as well as website

Hi, @chriz-space. If you are not using Cloudflare as a proxy to Netlify, the the branch subdomain instructions can be found here:

However, if you do proxy to Netlify using Cloudflare, we cannot provision SSL for you at all. There is more about why here:

If there are other questions those support guides don’t answer, please let us know.

Guys I need a simple setup Domain - Cloudflare - Netlify

I need dev.krzysztofcieslik.com to point dev branch

How to achieve that (Dont have to be with SSL) but it is 5 days we are conversating about that and still without success…

As I can see you got your first response on the day you posted. Then you took a few days for a follow-up and still got a reply on the same day. So, just to clarify, the delay is not on Netlify’s end.

Furthermore, just as @gregraven said, using CloudFlare is adding unnecessary complications.

And to answer your questions, @luke linked to a Support Guide that answers your question. To quote from that Support Guide:

Here is an example scenario:

  • the custom domain is www.example.com
  • the branch name is branch-name
  • the branch should be served at https://branch-name.www.example.com/
  • the TTL value (time to live value - more below) will be 3600 seconds which is one hour
  • the sub-domain at Netlify is happy-scientist-123456 (meaning the Netlify URL for the master branch is https://happy-scientist-123456.netlify.app/ )

With the values above defined for this example, the DNS record you create would look like so:

branch-name.www 3600 IN CNAME branch-name--happy-scientist-123456.netlify.app.

The format above is required and no other naming conventions will work .

So your case would look like:

Name: dev.www
Type: CNAME
Value: dev--krzysztofcieslikcom.netlify.app
TTL: 3600

Same goes for other subdomains.

2 Likes

Hi, @chriz-space.

I’ve sent you all the information required already. Did you read the guides I linked you to?

There are two options if not using Netlify DNS for a site:

A) If you are not proxying to Netlify, I sent you these instructions.

B) If you are proxying to Netlify using Cloudflare, then you must provide your own SSL certificate for that branch subdomain.

You haven’t said which of those options you have chosen. If you are choosing to not proxy and have Netlify provide the branch subdomain SSL certificate via Let’s Encrypt, then let us know when the required DNS records have been created.

If there are questions about what DNS records are required for “option A”, then please let us know.