Mobile app version of vmapp.org
Login or Join
Si4351233

: Google Webmaster Tools- Do I need to mark my SSL domain as a duplicate of my non-SSL domain? I have a Drupal 7 site served exclusively using SSL with the "bare" domain (no www). But, I see

@Si4351233

Posted in: #GoogleSearchConsole #Http #Https #NoWww

I have a Drupal 7 site served exclusively using SSL with the "bare" domain (no www).

But, I see that in Google Webmaster Tools, I can add the following:

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


I have added all of these for my site, accessed Site settings, and set it to Display URLs as example.com.

This is true for the example.com + example.com pair and the example.com + www.example.com pair. Do I need to do anything more to mark my https sites as duplicates of the non-https sites?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Si4351233

2 Comments

Sorted by latest first Latest Oldest Best

 

@Speyer207

SOURCE

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).



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_HOST}/ [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 (.*) %{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.


You should also inform Google your preferred domain (variation):


SOURCE

Specify a preferred domain:


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

10% popularity Vote Up Vote Down


 

@Shanna517

Google Search Console (formerly known as Google Webmaster Tools) does not have a preferred protocol settings (though oddly Google Analytics does).

You should ensure you have 301 redirects to direct users and search engines to the preferred version (https://example.com) and not allow your site to be accessed in multiple ways without redirecting to the preferred method.

Adding all 4 variants of your site is recommended best practice in case a variant has issues, but with the correct redirects, only the preferred version will have any data.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme