Url Redirect Non-www to www for my domain

I need help setting up a redirect so that any requests to “example,com” automatically redirect to “www,example,com”. I’ve tried using Page Rules but am still facing issues, especially with specific paths like example,com/path.

I get this error “This site can’t be reached example,com’s server IP address could not be found.”

What I’ve Tried:
Page Rules:

example,com/* → https://www,example,com/$1 (301 - Permanent Redirect)

Despite these settings, example,com/path does not redirect correctly.

What I Need:
All requests to .com should redirect to www,example,com, including specific paths like /path.

Can Anyone Help?

Thanks!

PS: replaced “.” by “,” because of the link limit in a post.

Do you have a DNS record for example.com? If not, use a proxied record of AAAA 100::

Page Rules are deprecated so use Redirect Rules instead. There is a guide here…
https://community.cloudflare.com/t/redirect-example-com-to-www-example-com-using-single-dynamic-redirects/636762/2

1 Like

If you place your URLs between ` backticks they won’t be turned into links.

`example.com` will be rendered as example.com

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