2

I am migrating one of my sites from HTTP to HTTPS. It is totally clear how to do things for my main www.myexampledomain.com, however I'm not sure some little details about migrating cdn.myexampledomain.com.

So what is the best way (from Google/SEO point of view) to 301 redirect my old http CDN links to the new https?

  1. My first idea is to simply set it in the Amazon Cloudfront admin to force http to https. This way when Googlebot visits an old http link it will be redirected to the new one. While the previous version is for the already indexed links, I would also change the CDN links on the site to https.

  2. After I did the 301 redirect, do I need anything else regarding to my CDN domain? Will Googlebot reindex the CDN links when detects the protocol change or it will be informed when I resubmit a sitemap for the main domain and indexes it again?

  3. Can be an issue if the SSL cert of the main and cdn domain is different?

1

As you are linking directly to images/files you cannot use rel=canonical as you would on your HTML pages. So a 301 redirect is the best option, there is no penalty for that.

First, make sure HTTPS is up and working on your CDN. I’d suggest updating as many links/tags as possible to use the HTTPS URLs, to ensure everything works fine. Then add your 301 redirects.

There’s nothing else required, Googlebot will update all its data in due course. Linking directly to the HTTPS images as I said above may help speed up indexing on the new URLs.

There is no issue if the certificate for the main site and CDN are different (in fact they must be different certs unless you’re using an expensive wildcard cert). As long as both certs are valid there is no problem.

3
  • Perfect! I appreciate your detailed answer. Can you please tell me how you mean you cannot use rel=canonical as you would on your HTML pages? In which situations should I use canonical? If the existing site has zero canonicals and I just simply redirect http pages to https, is it recommended to implement canonicals? – rihe Jan 9 '18 at 17:44
  • See here for a good guide to rel=canonical. It’s an HTML tag that you can to your web pages, so cannot be added to images or other files. (I just noticed in that guide there is a canonical HTTP header you can use, but it’s not necessary if you’re using 301 redirects.) – DisgruntledGoat Jan 9 '18 at 17:53
  • I will check. Fortunately it seems I don't need them, but good to know. Thanks – rihe Jan 9 '18 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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