• Hello, when a subsite is created and the user logs in to the subsite, it is redirected to example.com/subsite/wp-admin and directly redirected to the admin panel.

    However, if we define a top-level domain name for this subsite (such as customdomain.com) and the user logs in from the main site (example.com/wp-admin), he will be redirected to customdomain.com/wp-admin and must log in again. However, the user still appears logged in to the main site. You can’t just access the site’s admin panel. To do this, he must log in again at customdomain.com/wp-admin.

    What do we need to do to direct the user directly to customdomain.com/wp-admin and access the admin panel when he logs in to the main site?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Are you talking about a multisite installation? If so, what are the settings regarding the addresses of subsites? Is it set to subdomain or domains?

    Hi
    To ensure the user is redirected directly to customdomain.com/wp-admin after logging in to the main site, you need to configure a shared authentication system between the main site and the subsite. This can be achieved by using WordPress multisite features and ensuring proper domain mapping. Additionally, set the COOKIE_DOMAIN in the wp-config.php file to .example.com (the main domain) to allow shared login sessions across both domains. This will maintain the login state and redirect the user seamlessly to the custom domain’s admin panel.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.