Worker Not Being Triggered by Custom Route - Possible O2O Situation?

For Workes & Pages, what is the name of the domain?

hosthhi.com

What is the issue or error you’re encountering

I’ve set up a custom route to trigger a Cloudflare Worker, for the purpose of displaying a custom XML Sitemap. When navigating to the URL route, I get a 404 error. In regards to my DNS Settings, the two A record IP addresses and the CNAME for www were provided by the agency we’re working with, and we know that they use WPEngine, which I believe also uses Cloudflare. Could this been an Orange-to-Orange issue, in that because they are also using Cloudflare (via WPEngine) that it’s causing issue(s)?

What steps have you taken to resolve the issue?

I’ve purged the cache. I’ve checked the Logs. I also attempted to perform a Trace, but received the error: “hostname does not belong to your account”.

Screenshot of the error

You are using a proxied CNAME for www, but it may be for their legacy Cloudflare setup as you are getting this…

See if WP Engine can give you a CNAME in the format shown here…

The 2 A records, if also for WP Engine, would also need to be removed and replaced by a proxied CNAME for O2O to work.

My apologies in advance for my ignorance here, but can you explain this a little further?

And also, just to confirm, based on my setup, you do believe this issue is related to O2O?

As you get “hostname does not belong to your account” when doing the trace, then yes, the request isn’t passing through your account so you need to use the O2O CNAMEs for WP Engine if you want them to do so.

1 Like

Genuinely: Thank you for taking the time to help me. It means a lot.

One more follow-up question on this:

Based on your recommendation of using O2O CNAMEs, would our final DNS settings related to WP Engine simply be 2 CNAME records?

1 for www and 1 for non-www?

Instead of what we currently have:

  • CNAME (non O2O) for www
  • 2 separate A records for non-www, using 2 different IP Addresses

Yes, O2O only works if you use CNAMEs.

So, since CNAME won’t work with naked domain, I guess we could:

  • Create one O2O friendly CNAME record for www
  • Create a redirect rule for all traffic, non-www → www

Does this setup make sense?

I guess I’m just confused on how we would replace the 2 A records.

You can redirect the apex domain to www if that’s what you want to do.

A CNAME at the apex will also work for O2O. It will be flattened to return A/AAAA records when queried externally, but you must set it as a CNAME in your Cloudflare DNS if you want O2O on the apex domain (as Cloudflare can obviously see the underlying CNAME that a DNS request can’t).