Title: Double Domain
Last modified: January 11, 2018

---

# Double Domain

 *  Resolved [jrochelle](https://wordpress.org/support/users/jrochelle/)
 * (@jrochelle)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/double-domain-2/)
 * Inside this page .. plugins/multiple-domain/multiple-domain.php there is a line
   like this
 * echo ‘<link rel=”alternate” hreflang=”x-default” href=”‘.$this->originalDomain.
   $_SERVER[‘REQUEST_URI’].'”/>’
 * That returns a value like this
 * [https://www.digitalchalk.com/www.digitalchalk.com/](https://www.digitalchalk.com/www.digitalchalk.com/)
 * I fixed it by editing the line to be this
 * echo ‘<link rel=”alternate” hreflang=”x-default” href=”‘.$this->$_SERVER[‘REQUEST_URI’].'”/
   >
 * Not sure if this is the correct way to handle this, any idea? Could something
   else be the main problem? Anyone else have this problem?

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

 *  Thread Starter [jrochelle](https://wordpress.org/support/users/jrochelle/)
 * (@jrochelle)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/double-domain-2/#post-9855827)
 * Don’t think this is the right solution … as it does show a PHP error now that
   there is an Undefined property on that line now. Could someone please help with
   this? Thanks
 *  [ArcticFritid](https://wordpress.org/support/users/metuza/)
 * (@metuza)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/double-domain-2/#post-9937807)
 * Hello.. It sounds to me that you are using a old version of this plugin as i 
   can not find the line you are pointing to.
 * You can find the new version here: [https://github.com/straube/multiple-domain](https://github.com/straube/multiple-domain)
   
   BUT be aware that it does not work properly with SSL / https
 * And you will need to find this line:
    $protocol = !isset($_SERVER[‘HTTPS’]) |
   | ‘off’ == $_SERVER[‘HTTPS’] ? ‘http’ : ‘https’;
 * and replace it with this:
    $protocol = !isset($_SERVER[‘HTTPS’]) || ‘off’ == 
   $_SERVER[‘HTTPS’] ? ‘[http://&#8217](http://&#8217); : ‘[https://&#8217](https://&#8217);;
 * I have a fix if you need the full working code for also SSL/https. But i guess
   the developer will come up with a fix soon.
 *  Plugin Contributor [Gustavo Straube](https://wordpress.org/support/users/gustavostraube/)
 * (@gustavostraube)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/double-domain-2/#post-10320733)
 * Hello! These issues are now fixed on both GitHub repo and here on WP.org. You
   can update your plugin installation to 0.7 to get the latest updates.

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

The topic ‘Double Domain’ is closed to new replies.

 * ![](https://ps.w.org/multiple-domain/assets/icon-256x256.png?rev=2502840)
 * [Multiple Domain](https://wordpress.org/plugins/multiple-domain/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multiple-domain/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multiple-domain/)
 * [Active Topics](https://wordpress.org/support/plugin/multiple-domain/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multiple-domain/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multiple-domain/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Gustavo Straube](https://wordpress.org/support/users/gustavostraube/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/double-domain-2/#post-10320733)
 * Status: resolved