#www redirect is not working

1 messages · Page 1 of 1 (latest)

brave rampart
#

Hi, my www redirect is not working. I want to redirect www to non www.
www.entdecke.solar is not reachable. My website is hosted on cloudflare pages and I have a CNAME with www that goes to the pages URL

#

https entdecke.solar works fine

#

without www

#

but with www it fails

azure condor
#

Not sure about pages, but with workers I do not have to put those CNAMEs into DNS, I can just add "custom domains" in the settings tab for the worker

#

You can also set these custom domains directly in the wrangler.toml file like this ->

routes = [
  { pattern = "example.com", custom_domain = true },
  { pattern = "www.example.com", custom_domain = true }
]
brave rampart
#

though it does not automatically redirect www to https without www

#

thats what I want

#

because a lot of people are searching websites with www prefix

azure condor
brave rampart
#

indeed it does I just redid it, not sure where I tried doing that beforehand

#

Cause there it told me to use the root domain

#

But I probably was just on the wrong tab or something

#

thanks