简体   繁体   中英

How to get Google to forget I had an SSL site with Heroku SSL

I have a website, http://www.scubastic.com , which I use as a playground app for Ruby on Rails development and SEO hacking. I have run into an issue that I can not seem to fix on my own and it revolves around SSL, SEO, and Heroku.

TL;DR: I had an SSL site and I disabled it but Google still remembers the SSL site. How do I get Google to switch to the Non-SSL site when the SSL site still responds but with a Certificate error??

Basically, when I first created Scubastic.com, I setup Heroku SSL as an excercise in learning it. I setup Google Web Master Tools and began playing around with the various aspects of SEO as well. After I was satisfied, I disabled Heroku SSL and stopped the monthly bill.

Now I have a very interesting problem. Google can't seem to forget the HTTPS version of my site and index is quite stale. Worse, the link people get in Google greets them with an SSL Certificate issue (the *.herokuapp.com Cert doesn't match www.scubastic.com issue) which does nothing to help my page rank. If I manually click through the SSL errors, I do arrive at the website. I find this quite odd because I removed Heroku SSL entirely and the application still responds to SSL requests....to me this is a bug in Heroku and I wish I had greater control over the situation. Alas, I turned to trying to handle this at the application layer because SSL requests still hit the Rails stack (even though these requests should not respond at all!)

So my first attempt at fixing the Google index was to setup a 301 Moved Permanently redirect if any request came into the app as SSL.

class ApplicationController < ActionController::Base

  before_filter :redirect_ssl

  private 

  #only need this until Google doesn't link to HTTPS anymore
  def redirect_ssl
    if request.ssl?
      redirect_to "http://#{request.host_with_port}#{request.fullpath}", 
                  :status => :moved_permanently
    end
  end
end

If you go to Google and search for my site name, you can see the issue I'm having:

https://www.google.com/?q=scubastic

I basically just want Google to stop linking to my SSL site and refresh with the latest content.

Thank in advance for your help.

I was able to resolve the issue with my original post and a lot of patience . It took 5 days for google to update its index but now the link google serves to my site is the non-ssl version.

The redirect is not going to help currently because browsers will barf when they get an invalid certificate when trying to establish a SSL connection to Heroku and that's before any HTTP is done. I don't think it's a bug with Heroku: You removed SSL (and by implication the certificate) and that leaves no way for Heroku to respond correctly to SSL connection requests to your domain.

Here's what you can do:

  1. Re-add SSL on Heroku
  2. Add the redirection you have
  3. Wait for Google to cotton on to the change
  4. Remove SSL

还可以选择主动要求Google删除该页面,因为该页面已经过旧/不再可用:检查网站站长工具帮助中的“如何从Google删除旧信息或已删除信息”

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM