More threads by djbaxter

djbaxter

Administrator
Joined
Jun 28, 2012
Messages
3,778
Solutions
2
Reaction score
1,877
Bye Bye Preferred Domain setting
Google Webmaster Central Blog
Tuesday, June 18, 2019

As we progress with the migration to the new Search Console experience, we will be saying farewell to one of our settings: preferred domain.

preferred-domain-settings.png


It's common for a website to have the same content on multiple URLs. For example, it might have the same content on Example Domain as on Example Domain. To make things easier, when our systems recognize that, we'll pick one URL as the "canonical" for Search. You can still tell us your preference in multiple ways if there's something specific you want us to pick (see paragraph below). But if you don't have a preference, we'll choose the best option we find. Note that with the deprecation we will no longer use any existing Search Console preferred domain configuration. You can find detailed explanations on how to tell us your preference in the Consolidate duplicate URLshelp center article. Here are some of the options available to you:

  1. Use rel=”canonical” link tag on HTML pages
  2. Use rel=”canonical” HTTP header
  3. Use a sitemap
  4. Use 301 redirects for retired URLs
 
If we use the "sitemap"method, google says: "We don't guarantee that we'll consider the sitemap URLs to be canonical".
Is there a better method to define a preferred domain between: http://site, http://www.site, https://site, https://www.site ?
If you are on an Apache server, you can use an .htaccess file to redirect all non-www versions and all non-https versions to https://www.yoursite.com

Exactly how to do this depends somewhat on the server configuration but might look something like this:

Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^yoursite\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.yoursite\.com$
RewriteRule ^\$\/?(.*)$ "https\:\/\/www\.yoursite\.com\/\$$1" [R=301,L]

or

Code:
RewriteBase /
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
 

Login / Register

Already a member?   LOG IN
Not a member yet?   REGISTER

Events

LocalU Webinar

Trending: Most Viewed

  Promoted Posts

New advertising option: A review of your product or service posted by a Sterling Sky employee. This will also be shared on the Sterling Sky & LSF Twitter accounts, our Facebook group, LinkedIn, and both newsletters. More...
Top Bottom