Google Analytics Redirect rules

How to setup Google Analytics and Google Search Console/Webmaster Tools

When you move your site to ssl, you have to adjust your settings in Google Analytics and Google Webmaster Tools/Search Console accordingly. It’s not much work, but it’s important you fix it. In short, you need to set your primary domain in both Webmaster Tools as in Google analytics to your https domain. I’ll discuss Search Console first, but it really doesn’t matter in which order you do it.

Webmaster Tools / Search Console

In Google Search Console (Google Webmaster Tools), you should add the https variant, and you should set it to your preferred domain as well. You should add all variants of your domain:



If you don’t know how to add a new property, follow these instructions from Google.

Set one of the https domains as your preferred domain. This should match the one in the general settings of WordPress, the site url. To set as your preferred domain, do the following:

  1. On the Search Console Home page, click the site you want.
  2. Click the gear icon, and then click Site Settings.
  3. In the Preferred domain section, select the option you want.

Google Analytics

After you move to SSL, you should change your domain in Google Analytics to https. This way, GA starts registering your hits again. If the redirect wasn’t set in your .htaccess for some reason, try to add it manually. GA might not register hits when the .htaccess redirect was not in place.

To do this, in Google Analytics, go to manage / property settings, and change the protocol to https.

To make finding this setting a bit easier, I’ve added some screenshots to illustrate the needed steps. The language on the screenshots is not English, but it will look the same in English.

step-1-start step-2

Go to “Manage”


Select “settings”


Now, change the protocol to https.


Related Articles


  • Noumaan

    I think users don’t need to add preferred URL in Google Search Console (webmaster tools) any more. Also I can’t find the option to select https variant. Indexing HTTPS pages by default

    • Rogier Lankhorst

      Reading that article, I’d agree that Google does it’s ranking of http and https automatically, but in Google Search Console, you are encouraged to 1) add all versions of your site, and 2) set a preferred domain. See also this article of Google To select the https variant, add it first as site, then set it as preferred domain.

      • Kathy Fisher

        If I previously added my site to Google Search console as http, so I have to make an entirely new entry in Google Search console to add it as https?

        Thank you!

        • Rogier Lankhorst

          Yes, you add it as a separate property. It seems a bit strange, but that’s how Google like’s it 🙂

  • Erin Pavlicek

    Thank you so much, Rogier! This was a fantastic article, super easy, and very helpful! So grateful to you for all your work and services!

  • Barbara DiLucchio

    Hi Rogier,
    Does it matter whether I change the domain to https in Google Analytics first or Search Console first? Looking at the screen shots it looks like search console was done first but I want to be sure.

    Thanks very much,

    • Rogier Lankhorst

      No, the order doesn’t matter.

  • Felix

    I was change to https by let’s encrypt, but when I browse to my website, it does not appear blue locks. Pls help me. Tks.

  • Katia


    Even though I didn’t change this yet in Google Analytics, it does still count views on my website. One question I do have is, if I change http to https in GA, will I loose the historical analytics of the http address?

    Thanks for your help.

    • Rogier Lankhorst

      Hi Katia,

      On the sites I did the migration for, the historical data is kept after the change to https. Even if your hits are still registered, it’s better to let Google know what your primary url is.

  • Leana

    At the Google Search Console, I only got to enter the first variant of my site’s name and now I don’t understand how to verify it or how t enter the other versions. Such as http://www..etc or https:… I’m not understanding the Google Analytics portion of how to proceed with the real simple SSL plug in? Please help?

    Thank you

    • Rogier Lankhorst

      You can just add a new property in Google Search Console. I’ve added a link to Google instructions how to do this to the article. As for Google Analytics, if you follow the steps described in the article, you should be fine. Is there anything in these steps that is not clear?

  • Saul C.

    Thanks for the article! One question: Do we have to add a new property in Google Analytics with https instead? Or is making the switch from http to https as you described here all we need to do? I followed the article, and in analytics it still shows at the top instead of https. Is this normal? I have it set to https as you showed here but just want to clarify that this is all I need to do, or if I should add another property in analytics. Your clarification will be appreciated!!


    • Rogier Lankhorst

      It sounds like you’ve done it right. Is it possible the name of your property is “”? the name doesn’t have to contain the protocol, it’s just a descriptive name.

  • Hanif Adnan

    Hello, i already add all 4 variant URL to Webmaster and those are verified. But…i don’t know how to set one of the https domains as “preferred domain”. Can you help please ?

    • Rogier Lankhorst

      I’ve updated the article with instructions how to set a domain as preferred domain.

  • Martine Loeffen

    Hi there!

    Thanks for a great plugin!
    One question tho: after reactivating the plugin in WP 4.7.1, the “SSL activated! Don’t forget to change your settings in Google Analytics en Webmaster tools. More info.” message in my admin section has lost it’s x to close it.
    I’m very happy it’s all working, but I’d like to get rid of the message 😉 Saving the settings didn’t help.

    Any tips welcome, tia!


    • Rogier Lankhorst


      I have tested it with the latest beta release from WordPress, and it works without problems. In some cases the x is hidden behind the “help” dropdown.

  • Satruk

    its true if using ssl/https, we can using histats?

    • Rogier Lankhorst

      I don’t really know histats, but I wouldn’t know why not.

  • mike

    Nice plug in. Thanks for explanation on how to update console and analytics.

  • Fernand

    Amazing piece of information right here. Thank you so much!

  • John Taylor

    Erg bedank Rogier, er zijn veel mensen dier dit vergeten.

  • Isa Joe

    Thanks Rogier for this wonderful plugin, just followed the link via the plugin and i gained alot of knowledge regarding the SSL certificate and verification on google. Going to google webmaster tools to ensure everything is verified.

  • Marques

    First of all, thanks a lot for making such a wonderful plugin. I used clouflare free ssl & then installed your plugin. Everything is working fine as of now. So, do I need to change anything in Htaccess file?

    • Rogier Lankhorst

      I checked your redirect on the http domain, it is already 301 redirected. So you’re fine.

  • Nick

    Hi Rogier,

    Seems my site is SSL Safe on the backend (dashboard) but not on the front end?

    Any suggestions would be much appreciated!


    • Rogier Lankhorst

      I can see a 301 redirect to https, and a nice secure lock on your site. Looks fine to me!

  • Denilson de Andrade Pereira

    I understood that I must create property all my URLs in case 4. Well, my site had as main URL http: // www on it was my site map and my international follow up. Now my main URL is https: // www and here is my question. Do I have to leave the map site in the new URL and do the international follow-up configuration only for https: // www?

    • Rogier Lankhorst

      Yes, I would reset all these to your new url, that’s the best.

      • Denilson de Andrade Pereira

        After switching to https I see my website disappearing from Google searches.

          • Denilson de Andrade Pereira

            Hello! I tested in Redirect Checker and received this information Error: in URLs found how should I proceed? Help me please. I find it strange because in my .htaccess file a 301 redirect is created after installing Really Simple SSSL

        • Rogier Lankhorst

          Can you mail me the domain at rogier (at)

          • Denilson de Andrade Pereira

            Sent with subject: My domains.

          • Denilson de Andrade Pereira

            Hello Rogier! My sites are already normalizing and increasing in Google searches. Already started to have an increase of more than 50%. Thank you very much.

          • Rogier Lankhorst

            Glad to hear that 🙂

  • Maurizio Mau

    Hi and thanks for your plugin, work well, easily installed SSL, but now i lose over 50% of my traffic, and some keyword drop, any suggestion to fix ?
    I would not go back.
    Best Regards

    • Rogier Lankhorst

      If you have a 301 redirect, your traffic and ranking should normally be back in a few days, as all ranking will get transferred to the new domain. You can check this on

Leave a Comment