WooCommerce in a Subdomain - SSL Pages Redirect to Main Domain

695 views
Skip to first unread message

Brian Anderson

unread,
Aug 25, 2015, 1:19:36 PM8/25/15
to Minneapolis St. Paul WordPress User Group
I'm hoping someone in this group has experience with this and can help me out...

My client has WordPress install in the main domain and also in a subdomain.

The subdomain has a WooCommerce Shopping cart.

We have a wild card SLL for the domain that is working.

When "force ssl" is set on the the checkout page.it redirects to the main domain.

I've tried a number of recommended edits to the htaccess files (recommended by the host and found similar by searching)..

I've tried a number of plugins, and setting variations, and have tried setting the entire subdomain site to https.

I know this can be done, or at least i've found postings where it's been claimed to be solved, but the solutions provided aren't working for me.

I think it's either a matter of correctly setting the htaccess file, or a configuration problem with the certificate itself.

Anybody worked with this issue, or can anyone point me to resources?

Nick Ciske

unread,
Aug 25, 2015, 4:00:13 PM8/25/15
to Minneapolis St. Paul WordPress User Group
Is SSL is not setup correctly (e.g. the cert is installed in both vhost and both are marked as SSL), Apache can sometimes serve the wrong vhost. This happens on WebSynthesis if all sites are not SSL and you try to make a secure connection to a non SSL enabled site.

It seems like only your host can untangle this one -- this is likely deeper than .htaccess and it unlikely a WP setting?

Is SNI is not enabled, it may be an IP thing -- without SNI each SSL site requires a dedicated IP.

This may help:

As may this:

What is SNI?

_________________________
Nick Ciske
VP Web Engineering
@nciske

Nick Ciske

unread,
Aug 25, 2015, 4:21:15 PM8/25/15
to Minneapolis St. Paul WordPress User Group
Apparently I can't type today...

Brian Anderson

unread,
Aug 25, 2015, 4:51:49 PM8/25/15
to Minneapolis St. Paul WordPress User Group
Thanks, Nick. I've asked the host (Hostmonster) to take a look at the SSL configuration. It a Wildcard SSL on a dedicated IP that's supposed to cover subdomains, and my understanding is that the redirect happens because WordPress gets confused by the https URL and redirects to the default domain. The htaccess edits I've worked with are supposed to straighten that out. This is a semi-common issue, apparently. I'm getting an education in SSL trying to get this worked out. I'll take a look at the resources you linked and hopefully there's something i can pass on to hosting support.

Nick Ciske

unread,
Aug 25, 2015, 4:58:19 PM8/25/15
to mpls-stpau...@googlegroups.com
Can I suggest the host may be part of the problem? They should be able to sort this out for you… not require you to ask here…

"WordPress getting confused” … is an interesting theory… I’d have to see the setup/URLs involved to tell you if that’s BS or not...

_________________________
Nick Ciske
VP Web Engineering
@nciske
--
You received this message because you are subscribed to the Google Groups "Minneapolis St. Paul WordPress User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpls-stpaul-word...@googlegroups.com.
To post to this group, send email to mpls-stpau...@googlegroups.com.
Visit this group at http://groups.google.com/group/mpls-stpaul-wordpress.
For more options, visit https://groups.google.com/d/optout.

Brian Anderson

unread,
Aug 25, 2015, 5:56:04 PM8/25/15
to Minneapolis St. Paul WordPress User Group
Here's a reference, from a forum post:

"Due to canonical URLs when WordPress gets a URL and hostname that doesn't match the WordPress Address (URL) and Site Address (URL) then you get redirected."


It seems to fit what's happening...

I took a look at the certificate, but wouldn't know what to look for that might be wrong.

I also took at the zone file for the domain,in case there's something wrong about the way the subdomain was set up.

Granite Staff

unread,
Jul 11, 2016, 5:24:43 PM7/11/16
to Minneapolis St. Paul WordPress User Group
Brian,

Were you ever able to resolve this?  I'm having the same issue now and losing my mind.

Thanks!

Nick Ciske

unread,
Jul 11, 2016, 5:57:03 PM7/11/16
to mpls-stpau...@googlegroups.com
Granite Staff,

There’s a few issues that could be at play here, can you describe your specific issue?

_________________________
Nick Ciske
VP Web Engineering
@nciske


Brian Anderson

unread,
Jul 11, 2016, 6:05:34 PM7/11/16
to mpls-stpau...@googlegroups.com

Hi Nick,

 

Thanks for asking – this was quite a while ago now. When I ended my assignment with this client, sanity began to prevail and the shopping cart was moved into the primary domain. One issue was using a wildcard SSL – using an ssl specific to the subdomain would help, I think. The settings in the .htaccess files between the primary and subdomains would also be an issue – redirects in the subdomain are going to tend to take on the settings from the primary domain. It think. Wish I could be more help – highly recommend keeping your WooCommerce  stuff in the primary domain.

--
You received this message because you are subscribed to a topic in the Google Groups "Minneapolis St. Paul WordPress User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mpls-stpaul-wordpress/M7Tsoh2wnm0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mpls-stpaul-word...@googlegroups.com.


To post to this group, send email to mpls-stpau...@googlegroups.com.

Brian Anderson

unread,
Jul 11, 2016, 9:42:44 PM7/11/16
to mpls-stpau...@googlegroups.com

Hi Nick,

 

Thanks for asking – this was quite a while ago now. When I ended my assignment with this client, sanity began to prevail and the shopping art was moved into the primary domain. One issue was using a wildcard SSL – using

 

From: mpls-stpau...@googlegroups.com [mailto:mpls-stpau...@googlegroups.com] On Behalf Of Granite Staff
Sent: Monday, July 11, 2016 4:07 PM
To: Minneapolis St. Paul WordPress User Group <mpls-stpau...@googlegroups.com>
Subject: Re: {MSPWP} Re: WooCommerce in a Subdomain - SSL Pages Redirect to Main Domain

 

Brian,

--
You received this message because you are subscribed to a topic in the Google Groups "Minneapolis St. Paul WordPress User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mpls-stpaul-wordpress/M7Tsoh2wnm0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mpls-stpaul-word...@googlegroups.com.


To post to this group, send email to mpls-stpau...@googlegroups.com.

Granite Staff

unread,
Jul 12, 2016, 12:57:26 PM7/12/16
to Minneapolis St. Paul WordPress User Group
Thanks for the reply Brian,

I've called into BlueHost about 5 times with hold times ranging from 5 minutes to two hours as they have looked into the issue.

We moved our ecommerce site from Volusion to Wordpress/WooCommerce.  Our ecommerce store has always been on the domain: store.graniteind.com.  With Volusion we had a SSL applied to the subdomain without any issue.

Once we moved the site to WooCommerce, we upgraded to a private IP and BlueHost applied a wildcard SSL to our graniteind.com account and store.graniteind.com

The SSL has been installed properly according to BlueHost and my own third party research: https://www.sslshopper.com/ssl-checker.html#hostname=store.graniteind.com

http://store.graniteind.com loads without issue right now.  The problem is when the SSL site is loaded.  https://store.graniteind.com immediately points to our main domain.. graniteind.com

I have talked to BlueHost about this and they have provided me their solution: https://my.bluehost.com/cgi/help/766

When I make the suggested edits to the htaccess file it results in a different set of issues.

http://store.graniteind.com loads with terrible formatting - See attached (HTTP-PageIssue)
https://store.graniteind.com shows the green padlock indicating a secure SSL site, but throws an internal server error.  (HTTPS-PageIssue)

Talking to Bluehost about this they pointed to our error log and showed.. in summary..

[11-Jul-2016 13:42:40 UTC] WordPress database error Duplicate key name 'location_type_code' for query ALTER TABLE wp_kdpo_woocommerce_tax_rate_locations ADD KEY location_type_code (location_type(40),location_code(90)) made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, WC_Install::check_version, WC_Install::install, WC_Install::create_tables, dbDelta

[11-Jul-2016 13:42:40 UTC] WordPress database error Duplicate key name 'location_type_code' for query ALTER TABLE wp_kdpo_woocommerce_shipping_zone_locations ADD KEY location_type_code (location_type(40),location_code(90)) made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, WC_Install::check_version, WC_Install::install, WC_Install::create_tables, dbDelta

[11-Jul-2016 13:42:40 UTC] WordPress database error Duplicate key name 'meta_key' for query ALTER TABLE wp_kdpo_woocommerce_payment_tokenmeta ADD KEY meta_key (meta_key(191)) made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, WC_Install::check_version, WC_Install::install, WC_Install::create_tables, dbDelta

[11-Jul-2016 13:42:40 UTC] WordPress database error Duplicate key name 'location_type_code' for query ALTER TABLE wp_kdpo_woocommerce_tax_rate_locations ADD KEY location_type_code (location_type(40),location_code(90)) made by require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), do_action('init'), call_user_func_array, WC_Install::check_version, WC_Install::install, WC_Install::create_tables, dbDelta


It goes on for much longer than that.  


Applying the recommended solution to the upgrade.php folder on the store subfolder did not seem to solve the issue.

I talked to BlueHost about applying the WildCard ONLY to the subdomain but BlueHost said that it always must go through the main domain.

I've deactivated all the plugins.. including woocommerce and the issue still continued.

Which leaves me back at square one.  Unable to secure my subdomain.

I'm open to anything to help solve the issue.

Thanks in advance,

Jeremy

To unsubscribe from this group and all its topics, send an email to mpls-stpaul-wordpress+unsub...@googlegroups.com.

Granite Staff

unread,
Jul 12, 2016, 1:01:40 PM7/12/16
to Minneapolis St. Paul WordPress User Group
Here's the attached files. 
HTTP-PageError.PNG
HTTPS-PageError.PNG

Nick Ciske

unread,
Jul 12, 2016, 1:11:02 PM7/12/16
to mpls-stpau...@googlegroups.com
Sounds like it's time to move to a more capable host. 

This should be something they can solve for you in a few minutes...

I'd recommend LightningBase (locally owned)  or Flywheel. WP Engine works as well, but SSL gets expensive on their platform. 

We host sites as well, if you want a developer to answer the phone when you have an issue...

_______________________ 
Nick Ciske 
VP Web Engineering, Cimbura.com
@nciske

Granite Staff

unread,
Jul 20, 2016, 12:26:04 PM7/20/16
to Minneapolis St. Paul WordPress User Group
Hi Nick,

I agree that it should have been a simple solution.  I finally got a hold of someone at BlueHost and he recommended completely clearing out the htaccess file and placing the redirect code there:

Once I did that, everything worked perfectly.  Seems like it would have been the logical first step, but either way, it solved the problem.

Thanks for taking time to reply,

Jeremy
Reply all
Reply to author
Forward
0 new messages