Cannot connect an apex domain to Cloudflare Pages

I tried to use my apex domain with Cloudflare Pages. However, when I connected my apex domain, I encountered an error saying there were too many redirections. I don’t exactly recall the precise error message. Searching on Google, it appeared to be a certificate-related issue, so I removed what was labeled as an Advanced certificate in a screen similar to the attached picture.

It seems that this certificate was associated with a subdomain named ‘red’, which I had been using to test redirections with a Cloudflare Worker. It’s not visible in the picture now.

After removing the Advanced certificate, now I am getting a DNS_PROBE_FINISHED_NXDOMAIN error. I’ve tried removing and re-adding the custom domain to Cloudflare Pages multiple times to no avail.

I’ve heard that the problem might be with the CNAME record, so I wanted to switch to an A record, but it seems that doing so does not connect with Cloudflare Pages.

How can I resolve this issue? The domain I am currently having trouble with is

It seems to be an issue with the domain since it’s accessible with the dev domain.

Now, after posting, I am encountering the Too many redirects error again.

I tried deleting the cookies, but the result was the same.

Hi there,

You have a 308 redirect to itself:

Screenshot 2023-11-09 at 16.20.32

This is caused by a transform rule called Use index.html files that is rewriting the / URL to itself.
Since it only applies to /, you can bypass this by adding any random string to the end of your URL and it will load. Try .

Ultimately the solution will be to either correct the Rewrite URL Rule or delete it.

Take care.


Thank you very much, that was very helpful

1 Like

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