_cfduid cookie seems to "come and go"


I’m currently testing my site and my site after months of testing still shows the _cfduid cookie “coming and going”. That means that I find the cfduid cookie (to be visible) only after deleting the cache and testing the site using Opera’s built-in VPN (location inside Europe). Every other browser (including their respective incognito modes after clearing the cache), as well as cookie solutions like iubenda and Cookiebot, never seem to find the cfduid being set in my site. Is there a possible reason why the cfduid is set only randomly after clearing the cache in Opera VPN? I wasn’t able to find any info about my problem online.


That cookie should be always set when you send a non-redirecting request. What’s the URL?

I’d check out the requests carefully if you are not possibly sending the cookie anyhow, in which case it won’t be re-set.

That domain does not appear to be proxied in the first place. Hence no cookie either.

That means that I should check the Cloudflare settings, right? :sweat_smile:

It appears the domain is on a partner setup, so only the www record will go through Cloudflare. On the naked domain you will never have the Cloudflare cookie in this case.

That sure forwards a bunch of times (some through Cloudflare) before it ends up not proxied by Cloudflare.

Yeah. I’m using the Siteground add-on. That means that I’m using Cloudflare, but I will never get the cfduid to show up, right?

As long as you are on the www record you will get the cookie, however that redirects back to the unproxied naked domain.

yeah. I want to only use the naked (without the www) domain.

Yeah. www.mysite.com shows cfduid

In that case you need to disable the partner setup and sign up for a full account where the naked domain is proxied too.

That means moving my nameservers to Cloudflare, right?


So, to close the thread, pointing my nameservers to Cloudflare will still redirect www to the simple naked website.com, plus that I will get to see the cfduid showing up as a cookie every time? Thanks

Whether it redirects to your naked domain depends on your configuration. #Tutorials has more on that.

Right now your site is not really going through Cloudflare in the first place. If you cannot convince your host to make the naked domain go through Cloudflare as well you can only sign up for a full account.

Once on a full account you can configure your entire domain to go through Cloudflare.

I have the ability (and also the free Cloudflare account, if that’s what you mean with a full account) to do everything on my own. Siteground just gives me the option to let it go through them for simplicity (on my part) purposes. I will contact my domain registrar and I will wait for the required hours (up to 24 hours) to pass and the “transfer” to be completed. Thanks

You don’t need to transfer the domain.

Ask your host if you can tunnel the naked domain through Cloudflare as well. Most likely you cannot. In that case you should

  1. Disable Cloudflare on your host.
  2. Add the domain to Cloudflare.
  3. Change the nameservers to those provided by Cloudflare.
  4. Make all the necessary configuration changes, including the desired redirect.

Yeah. That’s what I meant. Thanks

(edit: I see that you added the “Solution” tag yourself :slight_smile: . Thanks again for your help)

Wasn’t me :slight_smile:

No worries, I also highly recommend to check support.cloudflare.com and #Tutorials as these resources really cover most aspects.


This topic was automatically closed after 14 days. New replies are no longer allowed.