Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

Subdomain login problems

Google led me to this page: http://lauragentry.com/blog/2012/01/05/when-wordpress-network-subdomain-blogs-wont-let-you-log-in/

There’s a chunk of code in there that I added to my wp-config.php file, to wit:

define('ADMIN_COOKIE_PATH', "https://wordpress.stackexchange.com/");
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');

What I don’t quite understand is why this works. Anyone know?

Updated It doesn’t completely work — I can now log in to the subdomains, but not the root domain.

Related Posts:

  1. Single sign on to sub-sites in Multisite Network
  2. Login on Multiple Sub-Domains without Multisite
  3. How to fix blocked cookies error that doesn’t let me log into wp-admin?
  4. Login problems on multisite installation with different domains
  5. Https and Http Login Issue on WordPress Multisite
  6. Is there something I need to know in order to use WordPress on foreign (Swedish) TLDs?
  7. How to login a user with wp_set_auth_cookie on a specific blog within a multisite environment
  8. Some Subdomains on a Multisite Install Not Found
  9. Cookies in Multisite network where sites have their own domain name?
  10. WordPress MU: Cookie error when trying to login on network WP instance
  11. Is there a is_user_logged_in() for multisite?
  12. Multisite on Windows with wildcard subdomains
  13. Are nested subdomains possible with a subdomain multisite?
  14. Can a multisite’s blogs be accessible from two different sub-domains?
  15. WP Multisite development with Mamp Pro and wildcard subdomains, not really working for me
  16. How to use alias domain for multisite installation?
  17. SSL wildcard issue for wp multisite subdomains
  18. What is the best way to load the WP environment in a subdomain of my multisite WordPress install?
  19. Wildcard subdomain for the same site
  20. Benefits or Problems for using Sub-Directory vs Sub-Domain install of WP Network
  21. Create multiple subdomains for multi-site from a database
  22. COOKIE_DOMAIN setting confusion
  23. WordPress Multisite. Can domain be used instead of subdomain?
  24. Multisite: differences between subdomain and subdirectory mode? Can it be switch after installation?
  25. How to set up WordPress Multisite on multiple domains without plugin?
  26. Security in WordPress plugin development
  27. Unable to login to new custom domain on multisite?
  28. NGinx + WordPress Subdomain Multi with core in Subdirectory
  29. Set subdomains live in a next step
  30. share login/logout sessions across two installs?
  31. Transfer Subdomain site to Multisite setup
  32. How to Login Once to an Entire WP Multisite Network
  33. Multisite installation combining subdomains and subdirectories
  34. How does wordpress multisite manage subdomains?
  35. Why can’t a WordPress network (multisite) in it’s own folder use subdomains?
  36. Multisite wordpress and subdomain URL collisions
  37. “Preview Changes” button doesn’t show changes for previously published posts/pages
  38. Subdomain multisite gives 404 on sub sites
  39. Add New Sub Site from the WordPress back end then in sub site options table option_value must be with https
  40. Multisite – Redirect All Users to Subsite Home Page on Subsite Login
  41. Cookie settings for session across WPML subdomains using custom AJAX login
  42. Testing Multisites with vagrant or Can I use multisite with only an IP address (without domain name)
  43. Changing Multisite URL after the subsite has been in use
  44. Trying to migrate a WordPress Multisite with Domain Mapping
  45. Getting an ERROR: Cookies are blocked error when logging in to a site on a different domain?
  46. WordPress Multisite Login Access
  47. How do I use different domain for subdomains in WP Multisite?
  48. Non-wordpress subdomains on Multisite Installation
  49. Sub-subdomain getting redirected to main domain
  50. Possible to create a multisite network where the main site is non-WP?
  51. On WordPress Network(multisite), Sub Blogs in Subdirectories or Subdomains? What’s better?
  52. How do I maintain static directories on multisite subdomains?
  53. Multisite Subdomain Using More Resources Than Others?
  54. Changing admin sub-domain in WordPress multisite
  55. WordPress Multisite local: wp-login.php refreshes on login Chrome Browser
  56. ‘Remote Login’ with MultiSite Domain Mapping still forcing users to login to all blogs individually?
  57. Change multi-site installation from sub-domains to sub-directories
  58. How can I have multiple URLs pointing to single WordPress installation?
  59. How to stay logged in on a multisite with different domains?
  60. Not able to access dashboard of subdomain
  61. Wordrpess Subdomains (Multi-Site) without Wildcard
  62. How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url
  63. Can I use two different domain names with a WordPress multisite network?
  64. WP MU – Accessing ‘Domain-Mapped’ WP-Admin with a subdomain
  65. Multisite setup on IIS with subdomains
  66. Icon font not working on subdomains of multisite
  67. WP Multisite – domain mapping to domain.com and separate site to domain.com/help
  68. How to run a subdirectory multisite install under a subdomain
  69. Child Site doesn’t appear in the Network menu
  70. Fresh Multisite Install – Can’t Log In
  71. WordPress Multisite/Network – How to use a subdomain as main blog and subdomain for child sites
  72. Auto Redirect after login
  73. WPMU Development Environment
  74. turn single domain off
  75. Redirect subdomain in Multisite installation?
  76. problem with main site (root domain) redirects to subdomain (multisite)
  77. Enable wildcard in a WordPress Multisite (Sub-Domains)
  78. WordPress MultiSite login to the respective site
  79. Multiple wordpress installations that shares WordPress & Theme but with separated database
  80. How to redirect one page on the subdomain
  81. WordPress Multisite Wildcard Subdomains on Plesk
  82. Making 2 WordPress sites mutually searchable and more
  83. Start with multi-site feature now or later?
  84. WordPress Multisite Question
  85. Multisite – 404 when accessing sub-sites
  86. Migrating wordpress multisite and domain mapping plugin
  87. Unable to apply theme to WordPress Network Site install
  88. Create subdomain out of sight the wp multisite
  89. multisite subdomain behind reverse proxy
  90. Nginx Wildcard SSL with WordPress Multisite Subdomains
  91. Is the Multi site functionality a viable option for Country and Language targeting?
  92. Multisite not using subdomains as hostname in from address when sending emails
  93. Good way to block users within a multisite setup without deleting them?
  94. Cookie signed verification failed – wp-saving-post
  95. Multisite – Looking for ideas to best manage a main site change
  96. ERR_TOO_MANY_REDIRECTS when i config my subdomains
  97. get post id by $content (so by post content)
  98. Multisite Subdirectory with same domain subdomain
  99. My subdomain on WordPress Multisite has gone
  100. Automatically login user across multisite
Categories multisite Tags cookies, login, multisite, subdomains
Empty Super Cache programmatically (with ACF action) [closed]
Change permalink for a single post type only

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress