• Resolved Ron Dowd

    (@rondowd)


    Hi,
    I experiencing an odd behaviour since switching my site to HTTPS and using the SG Optimizer plugin. Just wondering if the plugin is causing this.

    The following happens when viewing any post or page:

    1. Any internal links that are https:// get changed to https://. This is correct!
    2. The FIRST external link that is https:// also gets changed to https://. This is not correct. (No other external links on the same page or post get changed).

    The link above is an example of this.

    In the WordPress editor the code for the first link looks like:

    we attended the <a href="https://www.anzapweb.com" target="_blank" rel="noopener">ANZAP</a> seminar <em>Understanding the Emotional Brain</em>"

    (This is the one that gets changed to https://, which is not correct)

    ..and for the second and third links:

    In the primitive low road, the <a href="https://brainmadesimple.com/thalamus.html" target="_blank" rel="noopener">thalamus</a> quickly prompts the <a href="https://brainmadesimple.com/amygdala.html" target="_blank" rel="noopener">amygdala</a> into a fight-or-flight response

    (These two links do not get changed to https://, which is correct)

    Could the plugin be causing this to happen?

    [ No bumping please. ]

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    I found your hosting account and reviewed your ticket history. You have been discussing the transition from HTTP to HTTPS and the issues you faced in the process with our Support Team. The internal links appear to be redirecting correctly.

    Judging from your post here, you are not interested in redirecting the external links.

    I took the liberty of creating a dump of your database which you will find in your Home folder and search through to locate the links. The three URLs you provided here are represented like this in your database:

    https://www.anzapweb.com

    we attended the <a href=\"https://www.anzapweb.com\">ANZAP</a> seminar <em>Understanding the Emotional Brain</em>.

    https://brainmadesimple.com/thalamus.html

    In the primitive low road, the <a href=\"https://brainmadesimple.com/thalamus.html\" targe
    t=\"_blank\" rel=\"noopener\">thalamus</a> quickly prompts the <a href=\"https://brainmadesimple.com/amygdala.html\" target=\"_blank\" rel=\"noopener\">amygdala</a> into a fight-or-flight response

    This explains the behaviour you are describing:

    https://www.anzapweb.com gets redirected to https:// because it is defined in your database as https://www.anzapweb.com

    brainmadesimple.com does not redirect to https:// because it is defined in your database as https://brainmadesimple.com

    If load any of these two external domains via https:// you will see a warning because the external resources do not support SSL at the moment. An SSL needs to be installed for the external resources in order to load them via https://

    I am not comfortable with making modifications over your live database and this is why I did not remove the https:// for https://www.anzapweb.com. I believe that you will be able to proceed with this yourself.

    However, please note that accessing your website via HTTPS, and some of the external resources via HTTP could result with Mixed Content warnings on your website. I believe that this is what you are referring to in your last post in this thread.

    The Force HTTPS functionality of SG Optimizer will create a RewriteRule in your .htaccess file that will redirect all non-HTTPS links to HTTPS. If you plan on accessing your internal links with HTTPS and the external resources with HTTP, it will be better to turn off the Force HTTPS functionality of SG Optimizer. Then, once you can apply external resources that support SSL, you can turn it back on again.

    Of course, if you face further issues with this, please post a ticket from your User Area -> Support and update this thread with the ticket ID. I will follow up shortly after.

    Plugin Support ivanatanasov

    (@ivanatanasov)

    @rondowd

    My name is Ivan Atanasov, I am a Senior Support member at SiteGround. Please excuse the delayed response.

    I found your hosting account and reviewed your ticket history. You have been discussing the transition from HTTP to HTTPS and the issues you faced in the process with our Support Team. The internal links appear to be redirecting correctly.

    Judging from your post here, you are not interested in redirecting the external links.

    I took the liberty of creating a dump of your database which you will find in your Home folder and search through to locate the links.

    https://www.anzapweb.com gets redirected to https:// because it is defined in your database as https://www.anzapweb.com.

    brainmadesimple.com does not redirect to https:// because it is defined in your database as https://brainmadesimple.com.

    If load any of these two external domains via https:// you will see a warning because the external resources do not support SSL at the moment. An SSL needs to be installed for the external resources in order to load them via https://

    I am not comfortable with making modifications over your live database and this is why I did not remove the https:// for https://www.anzapweb.com. I believe that you will be able to proceed with this yourself.

    However, please note that accessing your website via HTTPS, and some of the external resources via HTTP could result with Mixed Content warnings on your website. I believe that this is what you are referring to in your last post in this thread.

    The Force HTTPS functionality of SG Optimizer will create a RewriteRule in your .htaccess file that will redirect all non-HTTPS links to HTTPS. If you plan on accessing your internal links with HTTPS and the external resources with HTTP, it will be better to turn off the Force HTTPS functionality of SG Optimizer. Then, once you can apply external resources that support SSL, you can turn it back on again.

    Thread Starter Ron Dowd

    (@rondowd)

    Thanks for your responses guys.

    I’ve now made changes to my site so I only link out to HTTPS web sites, so I’m happy to leave things as they are.

    Thread Starter Ron Dowd

    (@rondowd)

    But having said that, and being happy with the way things are, I still don’t understand the behaviour.

    (@ivanatanasov) you say:
    “If you plan on accessing your internal links with HTTPS and the external resources with HTTP, it will be better to turn off the Force HTTPS functionality of SG Optimizer. Then, once you can apply external resources that support SSL, you can turn it back on again.”

    But the Force HTTPS functionality on my site IS turned OFF at present*. So why do external links get changed to HTTPS?

    * On the SG Optimizer Force HTTPS page, the cross x is showing (which I’m assuming means it’s OFF). There is however a comment on the page saying:

    “Warning: It seems you’ve been using another plugin or manually configured your WordPress application to work over HTTPS. Please, disable all SSL forcing plugins and remove all .htaccess rules regarding SSL before you enable the option in order to avoid potential issues.”

    Maybe this is something that SiteGround has configured manually for me? As I’ve said, I’m happy with things as they are, I just don’t like not understanding why it works as it does!

    So thanks for not making any changes to my live site and thanks for your attention to this.

    Thread Starter Ron Dowd

    (@rondowd)

    And thanks for your response @hristo-sg. I’m not sure why your response wasn’t showing up on the forum.

    As I’ve said to @ivanatanasov, I’m happy with the way things are, I just don’t understand how it’s working and that concerns me.

    • On my site, the SG Optimizer Force HTTPS setting is OFF.
    • A warning appears on the Force HTTPS page saying “Warning: It seems you’ve been using another plugin or manually configured…”
    • All internal links are working correctly for HTTPS.
    • Any external link I specify that’s HTTP gets changed to HTTPS (I wasn’t so happy about that but now have implemented workarounds to link out only to HTTPS sites.)</>

    So what’s doing the rewriting of links to external sites?

    Plugin Support ivanatanasov

    (@ivanatanasov)

    @rondowd

    Some of the external links on your website were hardcoded within your website. Meaning, the links were included in in your website files with HTTP or HTTPS.

    Most of the links are part of the database

    The information is not that sensitive, however, we will be pulling it out directly from your database or website code. It is preferable that you post a ticket from your User Area -> Support so that you can be provided with the exact content of the database where the links have been used. You can use this information to go through your website and edit the links if you desire.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘First off-site link to https:// gets overwritten’ is closed to new replies.