93

Here at Stack Exchange we're working on moving all traffic to SSL. The reason we're not doing logged-in-users only is that one side of the login divide would suffer a redirect from Google every time. This happens because Google's only going to have http:// or https:// in the results, not both. Aside from building the SSL infrastructure (details here), the outstanding question we have is:
how do we best transition to SSL?

Here are the relevant bits of our plan (testing on small sites, moving up to stackoverflow.com):

  1. Get SSL ready/enabled (but not linked to) on all domains
  2. Start rendering only the <link rel="canonical"> as https://
  3. Start sending a 301 for all http:// requests to https:// (from our domains...of course we can't do anything about all the existing links pointing to us)
  4. After a transition period, set all user cookies as secure

So the endgame is having all content delivered over SSL and all HTTP requests redirected. What we're primarily concerned with is how this will affect PageRank to our sites. We depend a great deal on traffic that comes from Google and want to ensure that doesn't take a dive as we start delivering more security to our users.

The only bits I've found on this that seem to be substantive are a comment from a Google employee on an older question along similar lines:

@Frank Yes, I'm certain that Google treats HTTP and HTTPS URLs as separate URLs for crawling, indexing and ranking (I work with the web-search team here at Google). Doing canonicalization with a 301 redirect like you mentioned is a great way to solve this :) – John Mueller Oct 23 '10

and the only webmasters video I could find: Can switching to HTTPS harm ranking? The video doesn't have a solid answer, not one I'd base the future of a company on anyway.

Is our transition plan the best way to accomplish an SSL move, at least from an SEO perspective? If there's other more recent or concrete advice around how a move like this affects Google ranking we'd love to hear about it.

9
  • 3
    Would it be worth migrating one of the smaller SE sites first to evaluate the effect on page rank before doing it to the biggie?
    – Kirk Woll
    Commented Apr 23, 2013 at 1:49
  • 2
    @Jeff either we show http and authed users get kicked to https (a painful redirect for every hit from search) or we display https in the google search results, which means effectively we've switched everyone to https like we're planning anyway (but no redirects, at least coming from google). Whatever google shows will be the 95-99% traffic case, so we have to go full https to avoid redirects in the long term. Also, according to the logs it appears google tries to crawl us on https whether we advertise it or not... Commented Apr 23, 2013 at 2:24
  • 2
    @Kirk Absolutely, that's what I meant with the testing small sites parenthetical. The plan is to try on a set of smaller sites first. Commented Apr 23, 2013 at 2:25
  • 2
    @IlmariKaronen - Yep, not painful for us...painful for users, in places like Australia that can be up to an extra second on page load time. It's often much higher than that on mobile devices even here in the US. Our question pages render in under 50ms (most of the time half that), so any solution that adds latency is a huge impact in page load time. Percentage-wise, pretty much all the loading latency you'll see browsing our network is the transmission, so it would be a significant increase to double the request count for 95-99% of page loads. Commented Apr 23, 2013 at 12:26
  • 1
    @Nick: Would it really be 95%+? I can see that fraction of all your requests coming from Google, but surely the percentage must be a lot lower for logged-in users? That said, I do agree that a full second of extra latency does start to qualify as "painful". (You could solve that issue, and improve your latency in general, by having a bunch of geographically scattered front-end proxies, but that might be going a bit outside the scope of the question here... still, it works for Wikipedia.) Commented Apr 23, 2013 at 13:06

5 Answers 5

34

Your proposed solution is the best way forward from an SEO perspective. You avoid duplicate content by using the canonical URL and the 301 redirect will transfer most of your PageRank (a small amount is lost in the redirect). Plus thanks to the strength of Stack Overflow's pages in Google I would be more then stunned if you saw any fluctuations in your rankings. Smaller sites would see a transition period in their rankings while Google got caught up with their new URLs but I don't forsee that happening to Stack Overflow.

FYI, John Meuller, the Google employee you quoted, is an active member here. With a little luck he'll give us his perspective on this.

2
  • 16
    Yeah, I think this is a pretty sound approach. FWIW there was a similar discussion on Google+ a while back where we looked into some of the specifics: plus.google.com/106413090159067280619/posts/ZZVAS65mmw4 . Separating rel=canonical & redirects time-wise probably isn't necessary, but it can make it easier to catch problems earlier. One thing you didn't mention is HSTS, which might be worth considering at some point too. Commented Apr 23, 2013 at 21:38
  • Thanks from our team to both of you, we're much more at ease about this transition on the SEO side now. We have a few weeks of work minimal left yet, but we're still working towards the HTTPS switch. Commented Apr 30, 2013 at 10:45
11

About a year ago there was a bug in the permalink generating code for my WordPress site, which gets about 70% traffic from Google. The canonical tag started using the WP short URL format instead of the regular format.

Two weeks later, I found the bug when I noticed that my URLs were showing weird in the Google index. Instead of the full /999999/post-url-format-like-this/ in the results, it was showing ?post_id=99999 (or something similar).

There were no changes in traffic.

The bug was fixed, the canonical tag properly set again, and about a week later, Google had adjusted all of the indexed links back to the normal format. Painless, really.

So based on my experience, your plan should be:

  1. Change the canonical tag to point to the HTTPS URL instead.
  2. Google will automatically update all of the results in the index. This might take a few weeks and requires no 301 redirects. And... 95% of your traffic will be using SSL.
  3. Redirect logged-in users that click from another site.

Since 301 redirects do remove some of the pagerank, I don't see the point in using them right away, especially since the canonical tag should take care of the Google index.

5

I believe Google ranks the first URL seen should it be a short URL, HTTP or even HTTPS unless a canonical link has been used so right they are separate rankings so 301 transition would result in some juice lost in the transition.

However as John has also said its doubtful this would hurt stack, since stack has tons authority and trust with Google.

Also for all we know Google may even increase stacks rankings for going SSL since its making the site more secure for its users which in effect increases user experience which Google strongly believe in. Though this speculation but its good to be hopeful? :)

Also:

Google’s Matt Cutts said on a Hacker News comment that those who are interested in switching their whole web site from HTTP to HTTPS should go ahead and do that.

4
  • 6
    I don't think it's at all helpful to speculate that rankings may increase using SSL, since you don't have any remotely reliable information on that. Commented Apr 23, 2013 at 13:24
  • I think the Brains at Stack can establish what speculation means and consider what is helpful or not helpful. Thanks of pointing out the obvious thou ;) Commented Apr 23, 2013 at 16:34
  • 1
    My point is, it's speculation based on nothing at all. You may as well add to your answer, "For all we know Google will send the heavies around to your datacenter to destroy it". Commented Apr 23, 2013 at 20:03
  • 2
    It's speculation based on beliefs that a) SSL sites are better for users and b) Google has a history of promoting sites that are good for users.
    – Spongeboy
    Commented May 3, 2013 at 14:02
5

I recently moved several of my sites to SSL and the pagerank was not affected either positively or negatively. I followed all of Google's guidelines, which are basically just like you described:

  1. Get your site working smoothly with HTTPS. My biggest needed change was to only use relative and protocol relative links. For example: href="page.html" and when necessary href="//www.example.com/"
  2. Add rel="canonical" tags and point them to the HTTPS address of your page
  3. Use 301 redirects for all HTTP requests to send them to HTTPS

Set up both the HTTP and HTTPS sites in Google Webmaster, and monitor both closely.

4

I have been part of a similar transition on a moderately high traffic website, although with a difference: all of the URLs were changed and no 301 redirects were put in place.

I monitored closely the impact on Google rankings for roughly a month, and for most key words, 2-3 positions were gained, although I'm fairly certain that was completely due to better SEO.
I couldn't see any change that could be reasonably attributed to HTTPS only.

Your plan seems spot on, although I'm a bit torn about that second step, I'd personally go straight for 301.

Why not A/B test with a small number of preferably fake questions and check the effects on those?

1
  • 1
    We had considered the A/B testing approach, but the issue there is ratings fluctuate for other reasons, so we're still not seeing much concrete data from such an uncontrolled experiment. Given that, it seems better that we test at the site level since that's the actual change we want to make anyway. Commented Apr 23, 2013 at 10:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.