Hi there looking for help on http to https site redirect?

hi there, I would like to know how I stop the web from telling people (& me ofcourse) that my site is not secure and then its not opening the page & gives a message the the site or whatever is insecure.
My old website was with its web address was

The new website that I have built in WEBFLOW is now going to be called or directed to
https://thisismynewsite.com

Do I need to set up a specific redirect for the fact that it was “http” and is now “https” to make sure that the internet redirects all the old traffic from the http site to the new webflow https:// site please. ?

Keep getting warnings that the site is not safe and so dont think that the normal redirects are picking up this particular issue. (I have already done detailed redirects for general pages, added domains to webflow custom domains list, already done dns and A & CNAME settings with my domain provider, etc and as far as I can tell all of that is working well. So it seems like this (http to https issue) is the only issue that is still remaining.

Attached is a screenshot of what I see when I try to click on a link from the old url thats in google and it tries to take me to the new url. )I have no idea why it would try to go to " www.www. " which has twice as many www’s as it should that also seems really odd and I, guessing is ofcourse part of the problem I guess.


Please help . thanks.

Looks like you already got https://www.hedtkd.com working, and hedtkd.com automatically redirects to the same url.

@HEDTKD it looks like there’s some custom code with an http:// link so it’s pointing to a non-secure resource which is causing that error to be thrown:

CloudApp

Otherwise the site is loading with SSL hosting on my end:
CloudApp

Hi there,
thank you so much for your answers. yes it looks like the https pages are loading fine now so maybe Its just me not knowing that it might take a while. thanks.

As for the code aspect I think you could be right.

I have to say I dont know anything about coding I am afraid though so I dont know how to make this bit of code also secure. (if just changing that line of the code to simply read “https:” instead of “http” will/would be enough to sort this out but its worth a try) …if thats what you are suggesting ? (knowing computers and code its probably not as simple as that.

thanks for your help

@HEDTKD great question!

I totally understand! Code is overwhelming and difficult to read, building a site and implementing elements visually is much easier to grasp than having to update custom code.

Since an https:// version of that resource doesn’t exist, I wouldn’t advise going that route.
But if there was an https:// version, literally adding that s actually would resolve the error. :smile: But in this instance that’s not the case.

It looks like you’re using a code snippet to pull in a Twitter feed on the page (it would be good to ask how to do that here under the Code Help category of the Webflow Forum).

But for now since you’re not pulling in any tweets on the page, you could get rid of the custom code in the Footer Code Add code before </body> tag: section of your site wide settings.

Looks like you’d need to get rid of lines 31 - 89 as pointed out in this GIF, or this piece of code:

<script>
$(document).ready(function() {
    if ($(".twitter-content").length) //if there is a twitter feed run
    {
        function parse(document) { //start function
            $(document).find("TweetModel").each(function(n) { //finds the document

                var $tweettemp = $(".twitter-content").find(".template.tweet").clone(); //clone the template
                $tweettemp.removeClass("template"); //removes the template class making sure it only repeats from the template every time

                var $tweetfeed = $(this);
                var ImageURL = ($tweetfeed.find('ImageURL').text());

                $tweettemp.find(".twitter_text p").html($tweetfeed.find('HTML').text()); //puts the Tweet text in the copied template (repeat for image and date..)

                if (ImageURL.length > 0) { //statement to add image url (if there is an image display, if not use userlogo
                    $tweettemp.find(".twitter_image img").attr("src", ImageURL);
                } /* else {
                    $tweettemp.find(".twitter_image img").attr("src", $tweetfeed.find('UserLogo').text());
                } */

                var month = new Array(); //array for month display as text
                month[0] = "January";
                month[1] = "February";
                month[2] = "March";
                month[3] = "April";
                month[4] = "May";
                month[5] = "June";
                month[6] = "July";
                month[7] = "August";
                month[8] = "September";
                month[9] = "October";
                month[10] = "November";
                month[11] = "December";

                var dateString = $tweetfeed.find('Date').text(); //uses JS date function to set date format
                var d = new Date(dateString);
                var datetext = d.getDate() + " " + month[d.getMonth()] + ", " + d.getFullYear();
                $tweettemp.find(".twitter_text h6").text(datetext);

                $(".twitter-content").append($tweettemp); //putting clone on page

            });
        }



        $.ajax({
            url: 'http://social-ws.pu1.co/twitter/tweets/hedtkd/6', // name of feed you want to parse

            dataType: "xml",
            success: parse,
            error: function() {
                console.error("Error: Something went wrong");
            } //error if XML doesnt parse
        });
    } //end if statement
});

It’s always good to consult with whomever placed that code in there originally before removing it though, so I would advise doing that before removing it entirely.

Hope that this helps! :bowing_man:

1 Like