Custom Domain failing for cloudflare pages
Hey pages team, I just posted on the forums (https://community.cloudflare.com/t/cloudflare-pages-doesnt-work-with-custom-domain-on-cloudflare/539980) but I imagine I might be able to get faster help here.
My setup is:
Namecheap is my registrar.
I made a cloudflare zone and used all of the defaults. (I added it yesterday and deleted it and added it again today). It uses dorthy.ns.cloudflare.com and quinton.ns.cloudflare.com.
I made a cloudflare page, that works just fine accessed directly.
text-extractors-test.pages.dev
The page doesn’t work at all when accessed via the domain https://textextractors.com/ (which is setup via CNAME to the cloudflare zone).
But when I try to go to the website, it just fails it. I can’t access it on multiple browsers, my cell phone (not on network). I’ve tried reseting local DNS and I’m just out of options and don’t know what to configure.
When I navigate to the website via the domain, I get a "host error" but this is all managed by cloudflare and the pages.dev domain has no problem - what gives?
Cloudflare Community
Cloudflare Pages doesn't work with custom domain (on cloudflare)
Hi, I’ve got an issue with cloudflare pages and using a custom domain. My setup is: Namecheap is my registrar. I made a cloudflare zone and used all of the defaults. (I added it yesterday and deleted it and added it again today). It uses dorthy.ns.cloudflare.com and quinton.ns.cloudflare.com. I made a cloudflare page, that works just fine acc...
26 Replies
A custom domain doesn't work on a CNAME alone, you need to go the Pages project settings and add the domain under the Custom Domains tab
It is added there as well.
That's under the custom domain tab on the cloudflare pages... page.
Alright, let me check
Thank you!!!!
It seems to work for me
I saw it work yesterday. Then I started experiencing issues. I figured it was just DNS cache stuff, woke up this morning, and it kept failing.
That's definitely the site!
Thats strange indeed
I just purged my local dns cache this is what I get:
Now my url is "HTTP"
instead of https
but shouldn't cloudflare just be forcing HTTPS?
It should, let me see
That 523 seems to be a different error to the 522 you showed on community
Yes, that is correct.
also, when I try to enter https:// it just doesn't load - it times out.
Oh you're trying the www.
I'm sure I'm just stupid, but I don't understand why I have to monkey with all this stuff - I figured that cloudflare would be the one to manage it for me - that's at least instinctually why I chose the product.
Am I wrong here in that his requires a lot more configuration that I initially thought?
If you want the
www.
to serve the same website you need to add it as a custom domain also, or the recommended is a redirect: https://developers.cloudflare.com/pages/how-to/www-redirect/
Can you try curl -svo /dev/null https://textextractors.com
Running that
Is this correct ^
That's what cloudflares pages custom domain created, I haven't changed those settings.
A CNAME alone won't work and results in errors, you then need to add a Custom Domain entry or a redirect for the
www.
as wellACK, will do that now. Here is the result from the curl:
That IP is a Namecheap IP
Most likely your local device has the old DNS cached
I have run:
Is there something else I should run? Should I restart?
It could still be cached on your router or at the upstream DNS provider. Do you use one provided by your ISP or another provider like 1.1.1.1/8.8.8.8?
I have not modified it at all, so whatever is the expected default. I believe it is my personal router.
ok, switched it to 8.8.8.8 and it works fine now.
Thanks!
(It was my router's)
@erisachu , last comment - thank you!!!!
No problem!