Why website not working without www

Hi,

Please check My website working with www but not without www.
Hosted it on cloudflare pages and added cname record.

christianyoga .us

It seems you’re using Cloudflare Pages.

The Cloudflare Pages Custom Domain documentation notes:

Add a custom apex domain

If you are deploying to an apex domain (for example, example.com), then you will need to add your site as a Cloudflare zone and configure your nameservers.

​​Configure nameservers

To use a custom apex domain (for example, example.com) with your Pages project, configure your nameservers to point to Cloudflare’s nameservers. If your nameservers are successfully pointed to Cloudflare, Cloudflare will proceed by creating a CNAME record for you.

Currently your domain christianyoga.us is not using Cloudflare nameservers, which would explain why the apex domain doesn’t work. And it seems you’ve pointed it directly to a Cloudflare IP, which is a no-no… hence the Cloudflare error message you see.

In addition that sounds like some pretty good advice the way I’m doing it is with normalization and a 301 permanent redirect but you want to Google’ redirect Checker’ they have services that will just show you how it’s taking the www and dropping it and going to https etc

changed nameserver to cloudflare but still website not working without www

I can confirm you’ve switched your domain to use Cloudflare’s nameservers now.

But I don’t see any A/AAAA or CNAME record for your apex domain christianyoga.us.

First, add your apex domain as another custom domain in your Pages project. Now that your DNS is managed by Cloudflare, just begin the configuration and enter the domain – Cloudflare will add the necessary CNAME record for you automatically.

After the custom domain is confirmed active, your site should now work with and without www.

But you’ll probably want to choose one to serve the site, and redirect the other one… to avoid duplicate contains issues if SEO is important for your project. You’ll also probably want to redirect the default *.pages.dev address as well.

you cant see cname record because cloudflare dns added at domain registrar level.
cname record is at cloudflare cdn level added.

Now the website from domain registrar pointing to cloudflare cdn dns.
and www working but not without www.

tried adding page rule to redirect non www to www at cdn level but not working

found a solution at cloudflare documentation.
Needed to add an A record with ip 192.0.2.1 and it worked.

Adding the apex domain in Pages would have added the CNAME record for the apex domain for you automatically, but adding the dummy A record manually archives the same end goal.

Good luck!