Title: HTTPS different Site Address (URL)
Last modified: August 30, 2016

---

# HTTPS different Site Address (URL)

 *  Resolved [OviLiz](https://wordpress.org/support/users/ovib/)
 * (@ovib)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/https-different-site-address-url-1/)
 * I have a HTTPS blog with the WordPress Address (URL) like [https://blog.mydomain.com](https://blog.mydomain.com)
   while I have changed the Site Address (URL) is [https://mydomain.com/blog](https://mydomain.com/blog)
 * Is everything ok, but I want to force accessing only through HTTPS, so avoid 
   HTTP.
 * I have found this on your forum:
 *     ```
       # WP REWRITE LOOP START
       RewriteEngine On
       RewriteBase /
       RewriteCond %{HTTPS} !=on
       RewriteCond %{SERVER_PORT} ^80
       RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
       RewriteRule ^index\.php$ - [L]
       ```
   
 * But using it the URL address become [https://blog.mydomain.com/blog](https://blog.mydomain.com/blog)
 * Is there any way to avoid that?
 * PS. I’m not receiving your forum registration email (already checked Gmail spam,
   tried twice etc.).
 * [https://wordpress.org/plugins/bulletproof-security/](https://wordpress.org/plugins/bulletproof-security/)

Viewing 6 replies - 16 through 21 (of 21 total)

[←](https://wordpress.org/support/topic/https-different-site-address-url-1/?output_format=md)
[1](https://wordpress.org/support/topic/https-different-site-address-url-1/?output_format=md)
2

 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/https-different-site-address-url-1/page/2/#post-6622224)
 * There may be other ways to setup a subdomain site, but the only correct way that
   I am aware of is by doing these things:
 * Create a subdomain folder in your hosting account.
    /public_html/subdomain/ Create
   a DNS A or CNAME record in your web hosting control panel that points to the 
   subdomain site.
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/https-different-site-address-url-1/page/2/#post-6622225)
 * A subdomain site is a completely different/separate website/another installation
   of WordPress.
 * Example:
    If you have a root website installed in your hosting account root folder/
   public_html/ then that would be your primary site or an aliased domain installation
   on some hosts. WordPress would be installed in your hosting account root folder
   for this root domain/primary site.
 * Your subdomain site would be another installation of WordPress in a subdomain
   folder /public_html/subdomain/ since a subdomain site is a completely different/
   separate website.
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/https-different-site-address-url-1/page/2/#post-6622226)
 * This code below has worked in every possible scenario and every type of WordPress
   site. The only reason that I can possibly think of for why it is not working 
   on your websites is because your subdomain site is not setup correctly or you
   have a folder/directory structure problem. I cannot think of any other possibilities
   since over 1,000 people are using this code below on every type of WordPress 
   site and it works on all of them. Or in other words, you are the only person 
   where this code is not working for your WordPress setup/sites. So that indicates
   that there is a deeper problem with either DNS or your folder/directory structure.
   If problem 1 (DNS or directory/folder structure problem) is causing problem 2(
   Rewrite code is not working problem) then you need to fix problem 1 and not try
   to fix problem 2 because problem 2 will be fixed by fixing problem 1.
 *     ```
       # WP REWRITE LOOP START
       RewriteEngine On
       RewriteBase /
       RewriteCond %{HTTPS} !=on
       RewriteCond %{SERVER_PORT} ^80
       RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
       RewriteRule ^index\.php$ - [L]
       ```
   
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/https-different-site-address-url-1/page/2/#post-6622227)
 * Also the problem may be related to having WP_DEBUG turned on on your websites.
 * [https://wordpress.org/support/topic/trying-to-get-property-of-non-object-22?replies=3#post-7524721](https://wordpress.org/support/topic/trying-to-get-property-of-non-object-22?replies=3#post-7524721)
 * > Looks like you have WP_DEBUG turned on still: [https://wordpress.org/support/topic/php-notice-403php?replies=9](https://wordpress.org/support/topic/php-notice-403php?replies=9)
   > 
   > Also it is very possible that this problem here: [https://wordpress.org/support/topic/https-different-site-address-url-1?replies=19](https://wordpress.org/support/topic/https-different-site-address-url-1?replies=19)
   > is also related to having WP_DEBUG turned on. WP_DEBUG should only be turned
   > on during debugging and should not be left on permanently. On my testing site
   > where I test over 200 plugins and some random themes at the same time – when
   > WP_DEBUG is turned on some of those plugins do not work correctly or at all.
   > That is due to what those specific plugins are doing and the way WP_DEBUG is
   > intended to be used during development on a Development testing website and
   > NOT a Live Production website, unless something needs to be checked on a Live
   > Production site and a Development site does not exist (an exact copy of the
   > Live Production website).
 *  Thread Starter [OviLiz](https://wordpress.org/support/users/ovib/)
 * (@ovib)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/https-different-site-address-url-1/page/2/#post-6622228)
 * Sorry man, you’re actually right. I had tested some HTTPS redirects in the past
   with a plugin that was messing up and forgot about it.
 * My subdomain record is pointing to a different server IP where I managed to add
   the subdomain account through cPanel as any normal account, so I’m under public_html
   🙂
 * Have a good weekend and sorry to make you crazy for that…
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/https-different-site-address-url-1/page/2/#post-6622229)
 * No, big deal. I once spent 4 hours trying to figure out why something was not
   working and then remembered WP_DEBUG was set to true/turned On in wp-config.php.
   Ironic huh. 😉

Viewing 6 replies - 16 through 21 (of 21 total)

[←](https://wordpress.org/support/topic/https-different-site-address-url-1/?output_format=md)
[1](https://wordpress.org/support/topic/https-different-site-address-url-1/?output_format=md)
2

The topic ‘HTTPS different Site Address (URL)’ is closed to new replies.

 * ![](https://ps.w.org/bulletproof-security/assets/icon-128x128.png?rev=1731938)
 * [BulletProof Security](https://wordpress.org/plugins/bulletproof-security/)
 * [Support Threads](https://wordpress.org/support/plugin/bulletproof-security/)
 * [Active Topics](https://wordpress.org/support/plugin/bulletproof-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bulletproof-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bulletproof-security/reviews/)

 * 21 replies
 * 2 participants
 * Last reply from: [AITpro](https://wordpress.org/support/users/aitpro/)
 * Last activity: [10 years, 8 months ago](https://wordpress.org/support/topic/https-different-site-address-url-1/page/2/#post-6622229)
 * Status: resolved