128

I'm moving from HTTP to HTTPS for my entire site. The site is currently added to Google Search Console (formerly Google Webmaster Tools) as www.example.com and all the pages are indexed without using SSL.

How do I go about moving to the new HTTPS URLs on Google Search Console?

  1. Do I just submit an updated sitemap which has the HTTPS URLs or do I add a new site as https://www.example.com and submit the sitemap with HTTPS URLs? All current URLs are set to redirect to their HTTPS counterparts.

  2. Do I add multiple properties to Google Search Console?

2
  • 4
    I added it as a new site because when I set a redirect, the previous one started showing unable to access error. Aug 24, 2014 at 14:18
  • 1
    This post from john mueller might clear many of doubts of beginner or advance webmaster.
    – Goyllo
    Dec 22, 2016 at 18:03

5 Answers 5

101

Update (February 27, 2019):

Google have announced domain-wide data in Search Console, which combines all subdomains and protocols of a domain, http, https, www, and non-www.

Old answer:

Google Webmaster Tools treats HTTP and HTTPS as separate sites and you cannot inform Google using Google Search Console, that you moved from HTTP to HTTPS since the address move tool does not support protocol changes

You can though add the HTTPS site versions. When adding a site, simply type the URL including the https:// prefix. You will then have two sites in Google Webmaster Tools.

Screenshot of "add a site" dialogue

This fits with the general principle that http://www.example.com is considered a different URL from https://www.example.com and may validly serve different content, Google is OK with that. In practise, most websites set up a redirect, but Google Webmaster Tools is designed to work in either case, just add both sites.

Similarly, you should add the www and non-www versions of your site, so in the end, you should have four sites:

  • http://www.example.com
  • https://www.example.com
  • http://example.com
  • https://example.com

Until 2019, you could set whether www or non-www is preferred, but I'm not aware of a similar setting for HTTP vs HTTPS.

8
  • 7
    Question on this; If i have moved the whole site from http to https do i need to keep the old http code running?
    – DickieBoy
    Apr 28, 2015 at 9:31
  • 1
    Hi, took me a while to remember why i asked this question. The code i meant was account the verification code was associated with. Turns out: verification codes are the same from https as they are for http.
    – DickieBoy
    May 21, 2015 at 16:49
  • 2
    Do I need to resubmit sitemap on the https:// version?
    – user66638
    Dec 22, 2015 at 10:43
  • 8
    You can add a Strict-Transport-Security http header to make Google prefer HTTPS versions in search results. As described here. "Use a web server that supports HTTP Strict Transport Security (HSTS) and make sure that it's enabled. HSTS tells the browser to request pages using HTTPS automatically, even if the user enters http in the browser location bar. It also tells Google to serve secure URLs in the search results. "
    – gregn3
    Mar 23, 2016 at 12:45
  • 2
    Thanks for the udpate, but it's not at all clear. Does this mean we don't have to do anything at all, if http is redirected to https it will all just automatically work? If not what do we need to do, the Google link is hella vague.
    – niico
    May 8, 2019 at 16:27
38

The address move tool does not support protocol changes

Since HTTPS and HTTP are protocols you are not moving your site from one address to another, you are merely changing the URL path. Google Webmaster Tools does not support address moves on changes to the URL paths including sub domains, and protocols.

SOURCE

  1. Request an address change.

Use the Change of address tool when your site move entails a domain or subdomain change, such as changing from http://fish.example-petstore.com to http://example.com or http://example-petstore.com.
Note: The tool does not currently support the following kinds of site moves: subdomain name changes, protocol changes (from HTTP to HTTPS), or path-only changes.

Therefore you do not need to inform Google Webmaster Tools that you are changing protocols, however it is recommended that you setup redirects from all old URLS to the new URLS, and update your sitemap to include the new URLS.

Add all variations of your site to WMT

While the site address move tool may not treat protocols, url changes and sub domains as new sites, the rest of Webmaster Tools does treat protocols and sub domains as separate sites. You should add all variations of your site, below is an example of my site BYBE added to WMT with all variations, you should do the same. (recommended by John Mueller from Google, See comments below this answer).

bybe multiple sites in webmaster tools
(source: bybe.net)

301 redirects recommended by Google

If you plan to serve the website as partial ssl or complete then you should setup good redirects, as recommended by Google:

SOURCE

Prepare for 301 redirects Once you have a mapping and your new site is ready, the next step is to set up HTTP 301 redirects on your server from the old URLs to the new URLs as you indicated in your mapping. Keep in mind the following:

  • Use HTTP 301 redirects. Although Googlebot supports several kinds of redirects, we recommend you use HTTP 301 redirects if possible.
  • Avoid chaining redirects. While Googlebot and browsers can follow a "chain" of multiple redirects (e.g., Page 1 > Page 2 > Page 3), we advise redirecting to the final destination. If this is not possible, keep the number of redirects in the chain low, ideally no more than 3 and fewer than 5. Chaining redirects adds latency for users, and not all browsers support long redirect chains.
  • Test the redirects. You can use Fetch as Google for testing individual URLs or command line tools or scripts to test large numbers or URLs.

Setting up the redirect in Apache

Setting up redirects in Apache, ngInx, IIS is pretty straight forward, below is examples of redirecting 301 from HTTP to HTTPS in Apache2 .htaccess file.

SOURCE

Enforce SSL on specific pages and disable on rest

This script will remove SSL on all other pages part from the login page and register page, you can add more just use | as the separator between file names.

mod_rewrite:

RewriteCond %{HTTPS} on
RewriteCond %{SCRIPT_FILENAME} !\/(login|register)\.php [NC]
RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]

Enforce SSL on the entire site

If you want to enforce SSL on the complete site then you can use mod_rewrite to detect HTTPS off.

mod_rewrite:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Sitemap changes

Since you are changing protocol you need to add a new property to Google as HTTPs, this will have no sitemap submitted as default, you will need to ensure that your sitemap contains all the new URLS and then submit it under the HTTPS property variation.

11
  • 1
    Thanks for the insight, however what about fetching as Google, cause that starts with a http instead of as HTTPS, but by adding a site as a https://www.example.com , fetching as Google gives you the HTTPS option. So fetching as http for a site that's now HTTPS would go against whats already indexed. Aug 24, 2014 at 16:48
  • 1
    Well adding the site as HTTPS purely to satisfy fetch wouldn't merit it practical to add another site as HTTPS, since fetch will still work because of the redirect. The important test would be to see if you continue to get data such as web searches and crawls in Webmaster Tools. It would seem a waste to ditch that data unless you don't care about it, or it doesn't work. I just tested it and I'm surprised you can even add another site with HTTPS along with HTTP, I personally would add the two, don't delete one and see if they look the same and keep us informed. Aug 24, 2014 at 18:36
  • 2
    Will keep you posted, this video from google i/o is actually quite informative when it comes to my query, answers what I needed to know. youtube.com/watch?v=cBhZ6S0PFCY Aug 24, 2014 at 18:54
  • 4
    If you have both http and https then you need to add both as separate sites in GWT and verify them both. Https might just be a "different protocol" but it's technically possible to serve entirely different content from each. Likewise, an xml sitemap cannot contain both http and https urls, however if you have verified both in gwt then google lets you (google only afaik).
    – MrWhite
    Aug 24, 2014 at 20:31
  • 16
    Google Webmaster Tools treats https:// and http:// as separate sites; you should definitely add them separately if you use them both (or are migrating from one to the other). You should also update the sitemap file to point to the new URLs. Aug 26, 2014 at 21:33
12

If you are moving your site from HTTP to HTTPS, you will need to submit the HTTPS site as a new site (defined as new property). I was advised that I did not need to do this, however Google WMT stopped reporting index status, crawl errors and traffic.

Once I added the HTTPS to Google Webmaster Tools I started receiving correct data within the Google's WMT console.

8

Google has a site migration howto. A protocol change counts as url modification; this is the relevant section.

The switch goes much like a regular HTTPS switch. Once your urls are made protocol-relative, and before you start redirecting, you should validate the https site in Google's webmaster tools. It's a separate site with its own sitemap. There is no need for other Google-specific steps, but you can use their tools to validate that traffic is carrying over fine.

1

Google change of address tools: Note: The tool does not currently support the following kinds of site moves: subdomain name changes, protocol changes (from HTTP to HTTPS)

1
  • 2
    If this doesn't support what the OP is asking, then it doesn't really help as an answer.... Jan 22, 2015 at 17:30

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