Score:0

My web-app works when visited without a www prefixed to its domain, but it returns a 522 error when visited with a www prefix

cn flag

I am hosting a simple web-app on Cloudflare using pages and a basic DNS configuration for a custom domain name. For privacy sake, call it myapp. When I visit https://myapp.com the web-app works correctly, but when I visit https://www.myapp.com I am shown a 522 error.

I have subdomain set up and working correctly, admin.myapp.com, using the following DNS record:

type: CNAME, name: admin, target: myapp-admin.pages.dev

I have tried doing the same for a www subdomain to no success, using the following DNS record:

type: CNAME, name: www, target: myapp.pages.dev

My custom domain maps to my Cloudflare pages domain using this DNS record:

type: CNAME, name: myapp.com, target: myapp.pages.dev

Where might I be going wrong here?

Michael Hampton avatar
cz flag
Is the cloud orange?
djdomi avatar
za flag
remind that .dev has SSL Mandatory, which mean SSL must be enforced. either tell us the real domain or dont confuse with .com and .dev
Score:1
cn flag

Solved by creating a page rule that enables forwarding/redirects.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.