Title: Primary domain and WordPress HTTPS Plugin
Last modified: August 20, 2016

---

# Primary domain and WordPress HTTPS Plugin

 *  [plugins_lexblog](https://wordpress.org/support/users/plugins_lexblog/)
 * (@plugins_lexblog)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/primary-domain-and-wordpress-https-plugin/)
 * I have a client who has 8 blogs on our WordPress multisite network (I also have
   about 380 other sites on the same installation). This particular client requires
   SSL in the admin dashboard, so I use the WordPress HTTPS plugin to accomodate
   them.
 * domain.com has a wildcard SSL certificate to work with [https://*.domain.com](https://*.domain.com)
    - site1.domain.com works fine with WordPress HTTPS and WordPress MU Domain Mapping
      as a primary domain.
    - site2.domain.com’s primary domain is [http://www.site2.com](http://www.site2.com),
      however the dashboard login needs to be [https://site2.domain.com/wp-admin](https://site2.domain.com/wp-admin)
      in order to use the SSL certificate.
 *  - If I go to [http://www.site2.com](http://www.site2.com), I get redirected 
      to [https://site2.domain.com/wp-login.php](https://site2.domain.com/wp-login.php)
      just fine
    - When I try to sign in, I end up in a redirection loop and cannot log in
 * Is there any way around this? I see a “Domain Mapping” option in the WordPress
   HTTPS plugin, but before I try to remove the sites from WordPress MU Domain Mapping,
   I’d rather have the knowledge base all down on the subject in order to not cause
   a service disruption.
 * [http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/](http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Christian Foellmann](https://wordpress.org/support/users/cfoellmann/)
 * (@cfoellmann)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/primary-domain-and-wordpress-https-plugin/#post-3289817)
 * This is a question concerning WordPress HTTPS and the Domain Mapping section 
   there is not what you think it is. It does not provide domain mapping for the
   site. It is for outside resources only.
 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/primary-domain-and-wordpress-https-plugin/#post-3289857)
 * If you are going to use SSL in the admin for only the main site domain then you
   need to set domain mapping settings to run the admin into the original domain.
 *  Thread Starter [plugins_lexblog](https://wordpress.org/support/users/plugins_lexblog/)
 * (@plugins_lexblog)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/primary-domain-and-wordpress-https-plugin/#post-3289858)
 * Hi Ron –
 * Thanks for your reply!
 * I am not using SSL for the primary domain – only for the sub-domain (non-primary)
   backend part of the site.
 * Any other ideas?
 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/primary-domain-and-wordpress-https-plugin/#post-3289859)
 * > …only the main site domain…
 *  that includes the sub sites.
 * Unless you are using SSL for both the main site (including unmapped sub sites)&
   the mapped domains then the way to do it is run SSL on the main site and have
   the mapped domains admin panel run under the original url.
 * The alternative is to hire a developer to write some custom code for you that
   selectively enables SSL for you based on settings that the custom code manages.
 *  Thread Starter [plugins_lexblog](https://wordpress.org/support/users/plugins_lexblog/)
 * (@plugins_lexblog)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/primary-domain-and-wordpress-https-plugin/#post-3289860)
 * Here’s a clarification of my setup and the reasons:
 * [http://www.site1.com](http://www.site1.com) => URL the world sees when they 
   go to the site
 * site1.company.com => company.com has a wildcard SSL certificate attached to it
   because the client has many sites, so the wildcard cert is the most cost efficient
   way to give them SSL access across all their site backends at site2.company.com
   and site3.company.com
 * Most of the client’s sites use sitename.company.com, but three of them are different(
   site4.com, site5.com, site6.com)
 * So you’re saying I will need to modify the code to make this work? My thoughts
   are to possibly put a wrapper around the whole domain mapping plugin…
 * if($SERVER[‘HTTP_HOST’] == ‘company.com’)
    { … bypass the domain mapping plugin
   somehow based on the URI } else { … run the domain mapping code as intended …}
 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/primary-domain-and-wordpress-https-plugin/#post-3289862)
 * You’ll need to write a custom sunrise.php to selectively enable SSL.
 *  Thread Starter [plugins_lexblog](https://wordpress.org/support/users/plugins_lexblog/)
 * (@plugins_lexblog)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/primary-domain-and-wordpress-https-plugin/#post-3289876)
 * Ron-
 * thanks for your thoughtful reply. I’m the developer who will be looking into 
   the custom code to handle this issue. Would the code you envision to handle this
   selective enablement be something along the lines of case switches for each of
   the domains? Any offhand guidance is appreciated since changes to this file seems
   to be in the category of a core change to my thinking.
 *  Plugin Author [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/primary-domain-and-wordpress-https-plugin/#post-3289877)
 * sunrise.php is part of the domain mapping plugin & you cannot have multiple sunrise.
   php files. So, if you need to do something custom then the only choice you have
   is editing it.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Primary domain and WordPress HTTPS Plugin’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-mu-domain-mapping.svg)
 * [WordPress MU Domain Mapping](https://wordpress.org/plugins/wordpress-mu-domain-mapping/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-mu-domain-mapping/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-mu-domain-mapping/reviews/)

## Tags

 * [domain](https://wordpress.org/support/topic-tag/domain/)
 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [loop](https://wordpress.org/support/topic-tag/loop/)
 * [mapping](https://wordpress.org/support/topic-tag/mapping/)
 * [multisite](https://wordpress.org/support/topic-tag/multisite/)
 * [network](https://wordpress.org/support/topic-tag/network/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * 8 replies
 * 3 participants
 * Last reply from: [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/primary-domain-and-wordpress-https-plugin/#post-3289877)
 * Status: not resolved