WordPress

Fix "Cookies are blocked or not supported by your browser" in WordPress

Cannot log in because WordPress says cookies are blocked or not supported? Learn the real causes, from site URL mismatches to caching and stray output, and how to fix them.

BeginnerWordPress on cPanel hosting2 min read

The WordPress login error "Cookies are blocked or not supported by your browser" appears when WordPress sets its test cookie but cannot read it back. Your browser usually accepts cookies just fine; the cookie is being set for the wrong address, removed by a cache, or blocked by output sent before the headers.

Before you start

  • Access to cPanel → File Manager or FTP.
  • Try a private window first to rule out browser settings.

Common causes

  • Site URL mismatch – WordPress Address and Site Address use www or http while you log in on a different version.
  • Login page cached by a caching plugin, CDN or Cloudflare rule.
  • Stray output – whitespace or a PHP warning before headers stops cookies from being sent.
  • Security or cookie consent plugins interfering with the login.
  • A wrong COOKIE_DOMAIN in wp-config.php, often left over from a multisite or migration.

How to fix it

  1. Clear cookies for the site and log in from the exact URL your site uses (check with or without www).
  2. Check site URLs. In phpMyAdmin, look at siteurl and home in the wp_options table, or add to wp-config.php:
    define('WP_HOME', 'https://example.com');
    define('WP_SITEURL', 'https://example.com');
  3. Remove a bad cookie domain. Delete any define('COOKIE_DOMAIN', …) line that does not match your domain.
  4. Exclude login from cache. Purge all caches and make sure wp-login.php and /wp-admin/ are not cached in LiteSpeed Cache or Cloudflare.
  5. Look for stray output. Check wp-config.php and the theme's functions.php for spaces or blank lines before <?php. The error log will show "headers already sent"; see headers already sent.
  6. Disable plugins by renaming wp-content/plugins, then test the login.

Tip: If you recently moved to HTTPS, make sure both URLs in WordPress use https:// and that HTTP redirects to HTTPS. Mixed http/https logins are a classic cause.

FAQ

Do I need to change browser settings?

Rarely. If other sites work, your browser is fine.

Why does it only happen on one domain of a multisite?

Multisite cookie settings or domain mapping are mismatched for that site.

Can Cloudflare cause this?

Yes, a "Cache Everything" rule that covers the login page breaks cookies.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.