Support » Networking WordPress » Multisite with top level domains and no domain mapping plugin

  • I have wordpress setup running multisite with my main site on a subdomain eg. which means all additional subdomain sites would correspond to urls like, etc.

    What I actually ended up doing was pointing additional top level domains to the wordpress installation and editing database entries for each of the multisite entries to correspond with their domain. I have everything working pretty smoothly except for an issue trying to login from the additional sites.

    I don’t think a need domain mapping since I have each additional blog setup in subdirectories of the domains and not actually the roots so and are what actually end up pointing to the wordpress files. And except for the login issue everything is smoothsailing. Any ideas or suggestions?

    I think this has something to do with the way the login cookie is set which is probably defaulting to my main site What would be a good approach at fixing this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • And that’s why people use the domain mapping plugins – it makes the login issues smooth sailing. 😉

    Right but I don’t think domain mapping applies here.

    I tried setting up domain mapping but how would I set up each additional domain to map as

    My main blog site is set up as a subdomain pointed at a directory which has all the wp files. All additional blogs are pointed to a directory above the that directory so that the wp directory called “blog” is housed within and is accessible from additional domains only when the “/blog” is used in the url.

    I fixed all htaccess errors by setting up a dynamic base path but when I tried setting up domain mapping I got the same result as not using domain mapping: When I try loging in from an additional domain I don’t get any errors but the login page just seems to reload. This is what led me to believe I just needed a way to set the cookie domain dynamically and didn’t need the domain mapping plugin after all.

    Map the domains as usual and then on each one, make a page called /blog to get the url slug.

    Thanks for the suggestion Andrea but I worked out my own solution before checking your post.

    I don’t know if my way is simpler but it works exactly how I want it to: I don’t have redirections as the domain mapping plugin implies so my blogs are in a way really all tld domain installs (no subdomains) running off the same install with a single database.

    For those interested in what I did to fix this…
    I ended up deleting the domain mapping plugin from my mu-plugins folder but kept the sunrise.php and only the wp_domain_mapping table that the plugin installs. I customized sunrise to basically take the blog id, domain, and path, from the $current_blog object and used that for the $current_site object details. That ends up fixing all my cookie issues and lets me run each blog from it’s own domain. Of course since each of those blogs run on a sub directory from each domain I ended up having to change the $current_blog->path to change dynamically between ‘/’ and ‘/blog/’ depending on whether the main blog is being accessed

    I’ll probably end up having to write my own plugin to add entries to the wp_domain_mapping table and maybe even rename the table if I end up releasing the plugin but it all depends on how much interest there is and how much free time I have to contribute back to the community.

    I think with how WordPress is progressing with MS functionality the domain mapping plugin will not be needed and hopefully all the hacking I ended up doing will be a future default wordpress option.

    – I can’t see domain mapping being rolled into core.

    – there’s a domain mapping plugin out there (paid) that hides the originating install completely, negating the need for you to edit anything.


    What plugin is that? I’ve been working with the domain mapping so much to try and get my sites to run like independent sites, but from one install and I’m having a heck of a time.

    One thing that seems to come up a everywhere in these discussions, but never really explained by the ninjas, is getting a subdomain that is mapped to work if someone types into their address bar. It just get’s a server error instead of pointing to the correct site.

    Just so I can let you know all my steps:

    A. I have my main domain as the main account on a shared host (hostgator with cpanel)
    B. I created a subdomain and called it * and the root domain = and the document root is /public_html
    C. In my wp-config.php I have this rule define( ‘DOMAIN_CURRENT_SITE’, ‘’ );
    D. In my domain mapping options, I have it set to to server CNAME domain instead of the IP address (the ip doesn’t go to my main site if I type it in my address bar) and I’ve entered
    E. I’ve successfully parked 10 subdomains and added 10 sites.
    F. I’ve successfully mapped each subdomain to work at
    G. Here is where my trouble starts. If I navigate to or without the www I get an error “The page isn’t redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. * This problem can sometimes be caused by disabling or refusing to accept cookies.” – This seems like a big error to me. How can I force an attempt to navigate to a non www site go to the correct address?

    Any help would be greatly appreciated.

    getting a subdomain that is mapped to work if someone types into their address bar. It just get’s a server error instead of pointing to the correct site.

    then go look at your server. Is it even answering to the non-www version?

    If you’re getting the same result on the main domain, then you definitely don’t have something set up right on the server itself – unrelated to mapping domains or wordpress at all. is where the other domain mapping plugin is. (it’s mine). is one of my test domains I use for examples. Feel free to visit it on the www version too.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Multisite with top level domains and no domain mapping plugin’ is closed to new replies.