Worker not running

I have created a worker for my website but it is not working in all cases. The DNS I have set contains 2 4 A records (www, exampleDomain.com, mail and host42) www and exampleDomain.com both point to the same IP.

The worker when tested works, and it works when on the browser when I have the route of example.com/ using https//:www.exampleDomain.com in the browser. If I enter exampleDomain.com in the browser the worker does not run. I don’t have any page rules setup.

Any ideas on what I’ve done wrong?

It sounds like your Worker Route is *example.com/*, and it works when you visit https://www.example.com, but not plain old example.com Correct?

Which one is the canonical URL? If it’s ‘www’, then a Page Rule to redirect non-www over to www might be an easy fix.

You are correct in your understanding. It is not working when using plain old example.com. We only have a single site but obviously how the user gets to the site from the browser is different.

I will look at the tutorial.

Since you already have the DNS records, you can skip that part.

The site has Always use Https on but HSTS is not enabled.

I set up page forwarding from https://exampleDomain.com/* with 302 Temporary Redirect to https://www.exampleDomain.com/$1 but it still not working.

The redirect isn’t working? Or does https//:www.exampleDomain.com no longer work as it was earlier?

We are still in the same position. https//:www.exampleDomain.com and www.exampleDomain.com runs the worker but exampleDomain.com does not. In fact when using exampleDomain.com the site is not displayed correctly i.e. more just text. This has been the way it has been all the time.

Then it sounds like the redirect isn’t working. Is the root domain not proxied :orange:?

The root domain is proxied. i.e. exampleDomain.com we also have www as an A record proxied to the same IP. We do have 2 other A records pointing to mail and host42 but both of these are pointing to different IP’s.

Thanks for your help @sdayman I’ve found that cloudflare is actually working but for some reason it is not working when I go through the 2 mobile phone providers I have so it is some sort of caching issue. I’ve cleared the cache on the phones themselves and switched to a different DNS but that hasn’t resolved the issue.