Hello @kostasmichalaros, could you please provide more details about the issue you are referring to?
@kostasmichalaros The 400 Bad Request error occurs when the total size of all cookies sent in the request header exceeds your server’s limit. This isn’t caused by a specific plugin, but by the cumulative weight of all active trackers, session data, and analytics cookies.
Here are three ways to resolve this:
1. Disable PixelYourSite Advanced Data (Recommended) If you want to stop storing advanced tracking data in the user’s browser, add this filter to your theme’s functions.php file:
PHP
// Disable the creation of the PYS advanced data cookie add_filter(‘pys_disable_advance_data_cookie’, function ($status) { return true; });
2. Increase Server Header Limits If you have many active plugins, your server might simply have too low a limit for modern tracking needs. You (or your hosting provider) can increase this limit:
- For Nginx: Add/edit this line in your config:
large_client_header_buffers 4 32k;
- For Apache: Add this directive:
LimitRequestFieldSize 16384
3. General Cleanup Review other plugins that might be creating large cookies (e.g., session managers or other analytics tools). Since 400 errors are caused by the total size, reducing the load from any source will fix the issue.
Note: After applying these changes, please clear your browser cookies once to reset your session and verify that the error is gone.
Hi there. Thanks for getting back to me that fast. The server has litespeed so i added that another way. I will keep track of it and get back to you. have a nice day.