Mobile app version of vmapp.org
Login or Join
Sue5673885

: How to set preferred domain with https in Google Webmaster Tools I have registered a website and bought an SSL certificate, installed it and did some mod_rewrite rules to have all my traffic

@Sue5673885

Posted in: #Domains #GoogleSearchConsole #Https #ModRewrite

I have registered a website and bought an SSL certificate, installed it and did some mod_rewrite rules to have all my traffic go to example.com. So all is working nicely from that perspective.

I also went to Google Search Console and added/verified all the www, non-www and https, www sites. But when I go to preferred domain, I don't see the option for https. So I just decided to go with the example.com one. Is there anything I need to do? Do I need to add 301 redirects? Or how do I check I did it right?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Sue5673885

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sue5673885

as @w3dk mention in the comments, I had to add a R=301 in my .htaccess file.

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ %{SERVER_NAME}/ [R=301,L]
</IfModule>

I didn't try Goyllo's answer but I think it's a good one if you don't have access to the server.

10% popularity Vote Up Vote Down


 

@Becky754

Google Webmaster Tools has no option to set HTTPS as the preferred version. Google takes this automatically from your canonical link tag.

<link rel="canonical" href="https://example.com/">


So whenever the Google spider sees this line in your head section, Google automatically indexes the HTTPS version of your site.

Nowadays, Google indexes HTTPS pages by default, if it is available.

Additional Tips: If you move your site from http to https, then edit your internal webpage, and link to https version of your site. It helps to recover in drop traffic. You can use Google Webmaster Tools to find out which page is linked from which webpages.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme