Domain Singularity for HTTPS and SSL

There must be only one of the options allowed to have http status 200 for your domain that we call as domain sigularity.

shape
shape
shape
shape
shape
shape
shape
shape
Domain Singularity for HTTPS and SSL

Domain Singularity for HTTPS and SSL

The site name is expected by Google to return 200 for only one ssl status. Normally, there are four alternatives as below;

Alternatives Statuses
http://your-domain-name.comHTTP 1.1 301 Moved Permanently
http://www.your-domain-name.comHTTP 1.1 301 Moved Permanently
https://your-domain-name.comHTTP/1.1 200 OK
https://www.your-domain-name.comHTTP 1.1 301 Moved Permanently


We provide the http status codes next to the alternative domain name preferences above. 

Google doesn't like and doesn't prefers you to use domains starting with http:// . It doesn't matter if you use www or only your main domain name for your visitors, if it start with http:// that means you start doing SEO with a really wrong way. What Google likes is actually one of the alternatives that starts with https:// . You can use your domain name with www. subdomain prefix or directly and only with the main domain name. The important part here is that you allow your visitors coming your web site by using https:// and the status for 200 only for one of the alternatives, either www. or directly main domain name.


How to Handle?

There are different files for different server types to allow the visitors in only one way visit.

We give you an .htaccess file inner example for a structure as below;


RewriteEngine On

 

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://your-domain-name.com/$1 [L,R=301]

 

RewriteCond %{HTTPS} on

RewriteCond %{HTTP_HOST} ^www.your-domain-name.com$

RewriteRule ^(.*)$ https://your-domain-name.com/$1 [L,R=301]


After you replace exact domain name to the "your-domain-name" parts then this file will make your visitors come to your web site only with https and without www subdomain name. (We prefer)


The Reason That Non www Option Preference

Which is we prefer since this is shorter for visitors type than the www subdomain option, the other reason is that www is a subdomain and that means you limit your domain into a subdomain

If you wish to present your domain with www (this is also allowed for https option) then in this case your code look like as this;

RewriteEngine On

 

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://www.your-domain-name.com/$1 [L,R=301]

 

RewriteCond %{HTTPS} on

RewriteCond %{HTTP_HOST} ^your-domain-name.com$

RewriteRule ^(.*)$ https://www.your-domain-name.com/$1 [L,R=301]


** Normally, Unix based servers uses .htaccess file, but Windows server can also use this option in certain cases.
** This document will be updated for other server types.

Write a comment