Google search points to https, how do I change it to http?

Status
Not open for further replies.

scotlundy

New Member
Messages
21
Reaction score
0
Points
1
Hi, since my ssl certificate ran out yesterday (one that apparently free users shouldn't have had) I have noticed that my site listing in google is pointing to "https://mysite.com" and not "http://mysite.com". Therefore, when I click on the link it throws up "this site is not secure, go back for your safety.. etc."

All my page links within the site lead to http pages, but for some reason, at some point, google decided to have the index page (basically the gateway for visitors) have https:// in front of it.

How can I change this? I have done some googling and it appears that I can edit the .htaccess file to redirect google to http, but I'm finding different codes to add and getting confused and also not sure that it would even work.

Thanks for any help.
 

spacresx

Community Advocate
Community Support
Messages
2,181
Reaction score
195
Points
63
google would have to crawl your site as http for it to change.
as for the .htaccess you need code to force https requests to http.
something like this in your .htaccess
# Redirect HTTPS to HTTP
RewriteEngine On
RewriteCond%{HTTP:X-Forwarded-Proto}=https
RewriteRule^(.*)$http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
or this one
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

of course editing the HOST and REQUEST parts as needed
 

scotlundy

New Member
Messages
21
Reaction score
0
Points
1
of course editing the HOST and REQUEST parts as needed

Thanks for your reply. When you say edit those parts, do you mean put something like {HTTP_mysite.com} and {REQUEST_mysite.com} ? Sorry, this is all a bit new to me!
 

spacresx

Community Advocate
Community Support
Messages
2,181
Reaction score
195
Points
63
sorry i overlooked that those were part of the code.
i wasnt thinking straight.
with that said, just put the code as seen, dont edit it.
and it should automatically redirect any request for https to http
the RewriteCond %{HTTPS} on can be changed to
RewriteCond %{HTTPS} off if you want but the example shows it on.
 

spacresx

Community Advocate
Community Support
Messages
2,181
Reaction score
195
Points
63
if that does not work or gives you errors,
i tested this code myself, it worked for me site-wide.
# https to http.
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

just copy that code to your htaccess file. (doesnt need any editing)
that will force any https requests to http for whole site.
 

scotlundy

New Member
Messages
21
Reaction score
0
Points
1
Sadly, non of the codes worked for me. I put them all at the very top of the file, but still nothing.

You can see the problem for yourself if you put the search term "Scotland backpacking" into google. My site comes up around number 5 in the results and is scotlandbackpacking.com

I've made some small updates to the index page and reloaded it, hoping google will crawl and get rid of the https. If not, I'm going to have to leave x10hosting which is sad because I've been here for years.
 

spacresx

Community Advocate
Community Support
Messages
2,181
Reaction score
195
Points
63
that part wont change until google crawls your site again
the changes wont effect search engines right away.
or i think you can re submit it to google yourself.

but you can check if it works by trying to visit your own website.
it should change the https to http.

it looks like it works on my end, and i dont see https in your url.
 
Last edited:

spacresx

Community Advocate
Community Support
Messages
2,181
Reaction score
195
Points
63
@ scotlundy
it also came to my attention that there is another option.
in directadmin go to account manager > domain setup
click your domain name (more options open up)
check/uncheck the secure SSL (uncheck for just http if it was checked)

this dont change what google or yahoo already list but should help
prevent future https crawling.
 
Status
Not open for further replies.
Top