Google Showing HTTPS in results not HTTP

I’ve just found a couple of pages in search results which are indexed as https not http.

This is stopping the page work for some reason correctly and I have no idea where it gets this idea from. Seems there is always something that pops up like this via google.

My sitemaps have no reference to these pages so why has it chosen to do this on certain pages. I have no idea to what extent either

What I would like to do is just stop this happening across the board.

If anyone has any help that would be great. Thanks

Okay. Just Turned It Off.

I’ve bodged it so if anyone has the correct format. I am turning it on for a page that will never be reached and off for everything else.

I just want to turn it all off though…

# Turn SSL on for pagedoesnotexitsever
RewriteCond %{HTTPS} off
RewriteCond %{SCRIPT_FILENAME} \/pagedoesnotexitsever\.php [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

# Turn SSL off everything but pagedoesnotexitsever
RewriteCond %{HTTPS} on
RewriteCond %{SCRIPT_FILENAME} !\/pagedoesnotexitsever\.php [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]

I’ve moved this to Server Config as it really isn’t a Marketing problem. Server Config may still not be the best spot, but I think you may get more help here than in Marketing.

So let’s get down to the crux of the problem.

You have a site. The site primarily uses HTTP, but you also have an SSL Cert, so your site can and will sometimes use HTTPS? Why wouldn’t you just always use HTTPS then?

1 Like

Thanks

Anyway. Used the following to turn HTTPS off for all the pages in the site using port 443

RewriteCond %{SERVER_PORT} 443
RewriteRule ^/?$ http://%{SERVER_NAME}/ [R=301,L]

Yes, that would do that, but is there a reason why you are doing that? I know Google has made it known that it will prefer HTTPS over HTTP when possible (primarily for the security benefit SSL provides your visitors).

You made mention that some of your pages “break” when run using HTTPS, can you link to those? Maybe we can help you figure out why they do not function properly with HTTPS.

Hi. Thanks for your help

Page seems fine but the gallery will not scroll when you click ‘Next button’

I’ve just found this today, not sure how long it has been like that or how many other pages show up in the search like this too.

HTTPS Is now off though so it will work.

Actually

RewriteCond %{SERVER_PORT} 443
RewriteRule ^/?$ http://%{SERVER_NAME}/ [R=301,L]

Did not fix it so reverted to the top method for the time being.

I’m not sure if this is the issue or not, but whenever you have a site that can use HTTP or HTTPS you should load your external references like so:

What you currently have:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="http://malsup.github.com/jquery.cycle.all.js"></script>
<script type="text/javascript" src="http://malsup.github.com/jquery.easing.1.3.js"></script>

What should be used:

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="//malsup.github.com/jquery.cycle.all.js"></script>
<script type="text/javascript" src="//malsup.github.com/jquery.easing.1.3.js"></script>

That way it is protocol agnostic, it would load the file over HTTPS or HTTP.

1 Like

Hi.

Okay. I’ll take a look and test that out. We did click all the script links and css looking to see if we got a 404 error but they seemed fine so we will try what you said.

Just the script bits I take it?

Thanks again & I’ll let you know.

Any absolute URLs you have (starting with http:// or https:// should only use // as its start). So images, links, etc. That way it is agnostic to the protocol being used. Otherwise, you typically get an alert stating “Mixed content found on site” when you visit it over HTTPS and it is loading data over HTTP.

That seemed to do it. So far. Think I may have a few areas to fix.

What are the major benefits (right now) for using https at the moment. I’m not too worried about using it really until I can get it all working correctly. So might just keep it switched off for now until I am ready to investigate the rest of the site?

What do you think & thanks for all your help too.

All communication between your site and your visitor is encrypted. So the benefits are for your visitors more so than you.

Google has made a statement that it wants to give preference to sites that use HTTPS (not sure if this has been implemented yet, or if the implementation is meaningful yet).

Definitely a fair approach. I’m glad it was simple as making your links protocol agnostic. That at least is an easy fix :smile:

Lovely.

Thanks again for your help. I don’t think the benefits are enough at the moment to do the work just yet. Too much to do, so little time :slight_smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.