Non-www version returns 404 – Google Tag Gateway via Cloudflare not working on assi

What is the name of the domain?

https://exampledomain.com/

What is the error number?

404

What is the error message?

The error message when visiting the non-www URL (e.g., https://exampledomain.com/y20o) is typically: 404 Not Found The requested URL was not found on this server. This indicates that the root domain is not correctly routing the /y20o path, while the www subdomain does. If you’re including this in your Cloudflare post, you can add a line like: When accessing https://exampledomain.com/y20o, the browser returns a 404 Not Found error, while https://www.exampledomain.com/y20o loads correctly. Let me know if you’d like to attach a screenshot or browser console info too.

What is the issue you’re encountering

The non-www version of a URL (https://exampledomain.com/y20o) returns a 404 Not Found error, while the www version (https://www.exampledomain.com/y20o) works correctly. This is a problem because a Google Tag Gateway was configured via Cloudflare to route through the /y20o path. The expectation is that both www and non-www versions should behave the same, but currently only the www version functions as intended. It appears that Cloudflare is only handling the routing for the www subdomain, while requests to the root domain are not properly processed.

What steps have you taken to resolve the issue?

Tested multiple paths for the Google Tag Gateway setup via Cloudflare:

Tried /gtwgtm and /gtmgtw, both failed.

Settled on /y20o, which works only on the www version.

Verified DNS and Cloudflare settings to ensure both www and root domains are proxied (orange cloud enabled).

Checked redirect behavior and caching:

No page rules currently redirecting root to www.

No cache rules that would block the path at the root level.

Confirmed that the issue is not from the origin server, since the same path works via www.

Reviewed Cloudflare documentation and community posts for similar cases.

What are the steps to reproduce the issue?

Hi everyone,

I’m facing an issue with a domain configured through Cloudflare where a custom path was assigned for the Google Tag Gateway setup.

Here are the details:

The path /y20o was configured via Cloudflare as the endpoint for the Google Tag Gateway.

Previous attempts using /gtwgtm and /gtmgtw failed, so /y20o was chosen as the working option.

The URL https://www.exampledomain.com/y20o works and routes correctly (seems to redirect to Google as expected).

However, accessing https://exampledomain.com/y20o (without www) returns a 404 error.

It seems that Cloudflare is properly handling the request for the www version, but not for the root domain. This breaks the functionality for users or scripts that access the non-www version.

What is needed:
An end-to-end test and verification of the assigned path /y20o to confirm if Cloudflare is routing it correctly.

In case of a confirmed malfunction, escalation to Cloudflare Support may be needed. As far as I know, support is only available through the community for free plans, so I’m starting here.

Of course, I’ve avoided including any sensitive data as this is a public forum.
Any help, insights or shared experiences would be greatly appreciated.

Thanks in advance!

What feature, service or problem is this related to?

Web Analytics

404 not found error should come from the origin host/server itself and not from Cloudflare.

Did you cross-checked your Web server configuration files and verified it works normally without Cloudflare or temporary having Cloudflare on “Pause”? :thinking:

You can test by temporary Pausing Cloudflare:

  • Use the “Pause Cloudflare on Site” option from the Overview tab for your domain at dash.cloudflare.com .
  • The link is in the lower right corner of that page.

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