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

Login on Multiple Sub-Domains without Multisite

You can dynamically update the WP_HOME and WP_SITEURL constants in wp-config.php to reflect the requested host:

define( 'WP_SITEURL', 'http://' . $_SERVER[ 'HTTP_HOST' ] );
define( 'WP_HOME', 'http://' . $_SERVER[ 'HTTP_HOST' ] );

As long as visitors don’t click a link containing a different fully-qualified domain (or otherwise send a request to a different subdomain via a form action or some such), they should remain on the subdomain that was originally requested.

That said, I don’t see any reason why the admin dashboard being served on domain.com alone would prevent you from adding a pop-up jQuery login form… If anything, I think it’s kind of strange to serve the admin dashboard from those category-centric subdomains when it provides administrative functions for the entire site regardless of which (sub)domain it’s accessed from. Intuition would lead me to think the administration dashboard for category1.domain.com would administer category1 alone.

Related Posts:

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

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