Forward non-www to www for Pages site with external DNS

I’ve successfully set up my Cloudflare Pages site with a custom domain, using a CNAME.

The nameservers are not pointed at Cloudflare. Is there any way to forward the non-www version of the domain to the www version without changing the nameservers?

Right now the non-www domain points nowhere, which isn’t great. I’ve tried the docs, but it isn’t clear on this.

Welcome to the Cloudflare Community. :logodrop:

Yes, but not without access to your own webserver.

  1. Point the apex name to a webserver that you control.
  2. Secure it with a publicly trusted certificate.
  3. Configure the webserver to execute the redirect to the desired www hostname.
  4. ?
  5. Profit!

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